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] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHp75VdnvxhR7yB2sroH4y8VgU3ORnCC3wH4CEKYCX1XSPvMxg@mail.gmail.com>
Date:   Tue, 5 Jul 2022 21:12:03 +0200
From:   Andy Shevchenko <andy.shevchenko@...il.com>
To:     Kai-Heng Feng <kai.heng.feng@...onical.com>
Cc:     Kevin Tsai <ktsai@...ellamicro.com>,
        Jonathan Cameron <jic23@...nel.org>,
        Lars-Peter Clausen <lars@...afoo.de>,
        Hans de Goede <hdegoede@...hat.com>,
        linux-iio <linux-iio@...r.kernel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] iio: light: cm32181: Add PM support

On Tue, Jul 5, 2022 at 2:31 PM Kai-Heng Feng
<kai.heng.feng@...onical.com> wrote:
>
> The read on in_illuminance_input keeps at 0 after system sleep.
>
> So add proper suspend and resume callback to make the sensor keep
> working after system sleep.

...

> +static int cm32181_resume(struct device *dev)
> +{
> +       struct i2c_client *client = to_i2c_client(dev);
> +       struct cm32181_chip *cm32181 = iio_priv(i2c_get_clientdata(client));

Simply device_get_drvdata(dev) ?

> +       return i2c_smbus_write_word_data(client, CM32181_REG_ADDR_CMD,
> +                                        cm32181->conf_regs[CM32181_REG_ADDR_CMD]);
> +}

-- 
With Best Regards,
Andy Shevchenko

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ