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: <bdb3687ec29f4360b626822c5756443e@sphcmbx02.sunplus.com.tw>
Date:   Mon, 20 Dec 2021 08:35:15 +0000
From:   Tony Huang 黃懷厚 <tony.huang@...plus.com>
To:     gregkh <gregkh@...uxfoundation.org>
CC:     Wells Lu 呂芳騰 <wells.lu@...plus.com>,
        Rob Herring <robh+dt@...nel.org>,
        DTML <devicetree@...r.kernel.org>,
        "Linux Kernel Mailing List" <linux-kernel@...r.kernel.org>,
        Derek Kiernan <derek.kiernan@...inx.com>,
        Dragan Cvetic <dragan.cvetic@...inx.com>,
        "Arnd Bergmann" <arnd@...db.de>,
        黃懷厚 <tonyhuang.sunplus@...il.com>
Subject: RE: [PATCH v4 2/2] misc: Add iop driver for Sunplus SP7021

Dear grepkh:

> > > > +
> > > > +static ssize_t sp_iop_state1_show(struct device *dev, struct
> > > > +device_attribute *attr, char *buf) {
> > > > +     struct sp_iop *iop = dev_get_drvdata(dev);
> > > > +     ssize_t len = 0;
> > > > +
> > > > +     sp_iop_standby_mode(iop);
> > > > +     mdelay(10);
> > > > +     sp_iop_s1mode(dev, iop);
> > > > +     return len;
> > > > +}
> > >
> > > This function is not showing anything.
> > >
> >
> > The purpose of this function:
> > SP7021 has three power states:S0, S1 and S3.
> > S0:Default domain is on. IOP domain is on. AO domain is on.
> 
> > S1:Default domain is off. IOP domain is on. AO domain is on.
> 
> > S3:Default domain is off. IOP domain is off. AO domain is on.
> 
> > System enter S1 mode when read sysfs sp_iop_state1,
> 
> 
> That is not what sysfs is for, sorry.

I will modify this function.

> 
> > I hope to provide users with the ability to enter S1 mode by themselves.
> 
> > So I cannot use DEVICE_ATTR. I should use file_operations method.
> 
> 
> No, please use the normal power management callbacks for your driver that
> all other drivers use in the kernel.  There is nothing special about this one
> driver to warrant a totally new user/kernel api for it.
> 

OK, I understand.

Thanks

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ