All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Tony Huang 黃懷厚" <tony.huang@sunplus.com>
To: gregkh <gregkh@linuxfoundation.org>
Cc: "Wells Lu 呂芳騰" <wells.lu@sunplus.com>,
	"Rob Herring" <robh+dt@kernel.org>,
	DTML <devicetree@vger.kernel.org>,
	"Linux Kernel Mailing List" <linux-kernel@vger.kernel.org>,
	"Derek Kiernan" <derek.kiernan@xilinx.com>,
	"Dragan Cvetic" <dragan.cvetic@xilinx.com>,
	"Arnd Bergmann" <arnd@arndb.de>,
	黃懷厚 <tonyhuang.sunplus@gmail.com>
Subject: RE: [PATCH v4 2/2] misc: Add iop driver for Sunplus SP7021
Date: Mon, 20 Dec 2021 08:35:15 +0000	[thread overview]
Message-ID: <bdb3687ec29f4360b626822c5756443e@sphcmbx02.sunplus.com.tw> (raw)
In-Reply-To: <YbxJSxjumZ8nkOm8@kroah.com>

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


  reply	other threads:[~2021-12-20  8:35 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-16  1:38 [PATCH v4 0/2] Add iop driver for Sunplus SP7021 Tony Huang
2021-12-16  2:34 ` Tony Huang
2021-12-16  1:38 ` [PATCH v4 1/2] dt-binding: misc: Add iop yaml file " Tony Huang
2021-12-16  2:34   ` Tony Huang
2021-12-16 20:33   ` Rob Herring
2021-12-16  1:38 ` [PATCH v4 2/2] misc: Add iop driver " Tony Huang
2021-12-16  2:35   ` Tony Huang
2021-12-16  7:36   ` Greg KH
     [not found]     ` <CAHpW4oRTcXq6k2o4cjFeHznZrR737947UPE60nWyPTRLPTR0Gw@mail.gmail.com>
2021-12-17  8:10       ` Tony Huang 黃懷厚
2021-12-17  8:24         ` gregkh
2021-12-20  8:35           ` Tony Huang 黃懷厚 [this message]
2021-12-16  8:01   ` Arnd Bergmann
     [not found]     ` <CAHpW4oQmtd-gG1HYZT-Dk=QAvXKsKebzcOaVtrEeoujwoL9zSg@mail.gmail.com>
     [not found]       ` <316c16afbff74160b07bd74444f3b8e1@sphcmbx02.sunplus.com.tw>
2021-12-17  6:54         ` gregkh
2021-12-17  8:12         ` Arnd Bergmann
2021-12-17 10:24           ` Tony Huang 黃懷厚
2021-12-17 11:03           ` Tony Huang 黃懷厚
2021-12-22  7:20           ` Tony Huang 黃懷厚
2021-12-16 18:31   ` kernel test robot
2021-12-16 18:31     ` kernel test robot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bdb3687ec29f4360b626822c5756443e@sphcmbx02.sunplus.com.tw \
    --to=tony.huang@sunplus.com \
    --cc=arnd@arndb.de \
    --cc=derek.kiernan@xilinx.com \
    --cc=devicetree@vger.kernel.org \
    --cc=dragan.cvetic@xilinx.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=robh+dt@kernel.org \
    --cc=tonyhuang.sunplus@gmail.com \
    --cc=wells.lu@sunplus.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.