lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAE3SzaRiG9xv+DjfjMQtSEs6xdM90C3K2x2z3s5UNsm9Mn9tuQ@mail.gmail.com>
Date: Fri, 5 Sep 2025 08:55:48 +0530
From: Akshay Jindal <akshayaj.lkd@...il.com>
To: Andy Shevchenko <andriy.shevchenko@...el.com>
Cc: anshulusr@...il.com, jic23@...nel.org, dlechner@...libre.com, 
	nuno.sa@...log.com, andy@...nel.org, shuah@...nel.org, 
	linux-iio@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v5] iio: light: ltr390: Implement runtime PM support

On Thu, Sep 4, 2025 at 1:31 PM Andy Shevchenko
<andriy.shevchenko@...el.com> wrote:
>
> On Wed, Sep 03, 2025 at 04:56:43PM +0530, Akshay Jindal wrote:
> > Implement runtime power management for the LTR390 sensor. The device
> > autosuspends after 1s of idle time, reducing current consumption from
> > 100 渙 in active mode to 1 渙 in standby mode as per the datasheet.
> >
> > Ensure that interrupts continue to be delivered with runtime PM.
> > Since the LTR390 cannot be used as a wakeup source during runtime
> > suspend, therefore increment the runtime PM refcount when enabling
> > events and decrement it when disabling events or powering down.
> > This prevents event loss while still allowing power savings when IRQs
> > are unused.
>
> ...
>
> > -static int ltr390_read_raw(struct iio_dev *iio_device,
> > -                        struct iio_chan_spec const *chan, int *val,
> > -                        int *val2, long mask)
> > +
> > +static int ltr390_do_read_raw(struct iio_dev *iio_device,
> > +                     struct iio_chan_spec const *chan, int *val,
> > +                     int *val2, long mask)
>
> The new indentation is broken.
Will fix.
>
> static int ltr390_do_read_raw(struct iio_dev *iio_device,
>                               struct iio_chan_spec const *chan,
>                               int *val, int *val2, long mask)

> > -static int ltr390_write_event_config(struct iio_dev *indio_dev,
> > +static int ltr390_do_event_config(struct iio_dev *indio_dev,
> >                               const struct iio_chan_spec *chan,
> >                               enum iio_event_type type,
> >                               enum iio_event_direction dir,
>
> You forgot fixing an indentation of the parameters.
Will fix.

> > +static int ltr390_write_event_config(struct iio_dev *indio_dev,
> > +                             const struct iio_chan_spec *chan,
> > +                             enum iio_event_type type,
> > +                             enum iio_event_direction dir,
> > +                             bool state)
>
> Broken indentation.
Will fix.
>
> ...
>
> > +     ret = devm_pm_runtime_set_active_enabled(dev);
> > +     if (ret)
>
> > +             return dev_err_probe(dev, ret,
> > +                                  "failed to enable runtime PM\n");
>
> It's exactly one line of 80 characters!
Will make it 1 line.
>
> ...
>
> > +     /* default value of irq_enabled is false*/
>
> Missing space
>
Will fix.

Hi Andy, thank you for the review. Will fix the parametric indentations
in all the places.

Will you be able to take another look in case there is more feedback?
Would love to include them as well in v6.

Thanks,
Akshay

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ