lkml.org 
[lkml]   [2012]   [Aug]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH 1/7] mfd: add imx syscon driver based on regmap
    On Wed, Aug 22, 2012 at 03:18:42PM +0800, Dong Aisheng wrote:

    > From: Dong Aisheng <dong.aisheng@linaro.org>

    > Add regmap based imx syscon driver.

    Nice to see more regmap-mmio usage!

    Reviwed-by: Mark Brown <broonie@opensource.wolfsonmicro.com>

    from a regmap point of view.

    > +int imx_syscon_write(struct device_node *np, u32 reg, u32 val)
    > +{
    > + struct device *dev;
    > + struct imx_syscon *syscon;
    > + int ret = 0;
    > +
    > + dev = driver_find_device(&imx_syscon_driver.driver, NULL, np,
    > + imx_syscon_match);
    > + if (!dev)
    > + return -EPROBE_DEFER;
    > +
    > + syscon = dev_get_drvdata(dev);
    > + ret = regmap_write(syscon->regmap, reg, val);

    It'd be good to provide a way of retrieving the regmap so that drivers
    for subsystems with generic regmap code could use the framework features
    (regulator is one example that I just mentioned in my other mail).
    [unhandled content-type:application/pgp-signature]
    \
     
     \ /
      Last update: 2012-08-22 18:41    [W:3.072 / U:0.696 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site