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: <20191120091339.4de02ad0@kemnade.info>
Date:   Wed, 20 Nov 2019 09:13:39 +0100
From:   Andreas Kemnade <andreas@...nade.info>
To:     Pierre-Hugues Husson <phh@....me>
Cc:     Lee Jones <lee.jones@...aro.org>, a.zummo@...ertech.it,
        alexandre.belloni@...tlin.com,
        linux-kernel <linux-kernel@...r.kernel.org>,
        linux-rtc@...r.kernel.org, b.galvani@...il.com, stefan@...er.ch,
        letux-kernel@...nphoenux.org
Subject: Re: [PATCH v2 2/5] mfd: rn5t618: add irq support

On Wed, 20 Nov 2019 08:54:44 +0100
Pierre-Hugues Husson <phh@....me> wrote:

[...]
> >
> > +static int __maybe_unused rn5t618_i2c_suspend(struct device *dev)
> > +{
> > +       struct rn5t618 *priv = dev_get_drvdata(dev);
> > +
> > +       if (priv->chip_irq)
> > +               disable_irq(priv->chip_irq);
> > +
> > +       return 0;
> > +}
> > +
> > +static int __maybe_unused rn5t618_i2c_resume(struct device *dev)
> > +{
> > +       struct rn5t618 *priv = dev_get_drvdata(dev);
> > +
> > +       if (priv->chip_irq)
> > +               enable_irq(priv->chip_irq);
> > +
> > +       return 0;
> > +}  
> 
> For what it's worth, the boards I have (Archos 101 Oxygen and Pipo P9)
> with rc5t619 use GPIO for power button.
> So IRQ would need to be enabled in suspend for this to work.
> Also, since you actually added alarm support, perhaps you want to
> wake-up from suspend using alarm as well?
> 
Already tested that, that works, because device_init_wakeup() is used. 
disable_irq() is needed because we cannot do i2c that early after resume.
Other mfd drivers do thas as well and waking up works.

Regards,
Andreas

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ