Re: [Patch v1 5/7] DA9055 HWMON driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> -----Original Message-----
> Subject: Re:  [Patch v1 5/7] DA9055 HWMON driver
> 
> On Fri, Sep 14, 2012 at 7:01 PM, Ashish Jangam
> <ashish.jangam@xxxxxxxxxxxxxxx> wrote:
> > This is the HWMON patch for DA9055 PMIC and has got dependency on the
> > DA9055 MFD core.
> >
> > This patch monitors the DA9055 PMIC's ADC channels vddout, junction
> > temperature and auxiliary channels.
> >
> > This patch is functionally tested on Samsung SMDKV6410.
> >
> > +static ssize_t da9055_read_auto_ch(struct device *dev,
> > +                               struct device_attribute *devattr, char
> *buf)
> > +{
> > +       struct da9055_hwmon *hwmon = dev_get_drvdata(dev);
> > +       int ret, adc;
> > +       int channel = to_sensor_dev_attr(devattr)->index;
> > +
> > +       mutex_lock(&hwmon->hwmon_lock);
> > +
> > +       ret = da9055_enable_auto_mode(hwmon->da9055, channel);
> > +       if (ret < 0)
> > +               goto hwmon_err;
> > +
> > +       mdelay(10);
> can this be sleep here?
Yes, as the code is mutex protected msleep() can be used.
> > --
> > 1.7.0.4
> >
> >
> >
> > _______________________________________________
> > lm-sensors mailing list
> > lm-sensors@xxxxxxxxxxxxxx
> > http://lists.lm-sensors.org/mailman/listinfo/lm-sensors



_______________________________________________
lm-sensors mailing list
lm-sensors@xxxxxxxxxxxxxx
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors


[Index of Archives]     [Linux Kernel]     [Linux Hardware Monitoring]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux