Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1710790 > unrolled thread
| Started by | Chen-Yu Tsai <wens@csie.org> |
|---|---|
| First post | 2017-08-14 12:10 +0200 |
| Last post | 2017-08-17 02:50 +0200 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: [PATCH v3 1/2] Input: axp20x-pek: use driver_data of platform_device_id instead of extended attributes Chen-Yu Tsai <wens@csie.org> - 2017-08-14 12:10 +0200
Re: [PATCH v3 1/2] Input: axp20x-pek: use driver_data of platform_device_id instead of extended attributes Dmitry Torokhov <dmitry.torokhov@gmail.com> - 2017-08-17 02:50 +0200
| From | Chen-Yu Tsai <wens@csie.org> |
|---|---|
| Date | 2017-08-14 12:10 +0200 |
| Subject | Re: [PATCH v3 1/2] Input: axp20x-pek: use driver_data of platform_device_id instead of extended attributes |
| Message-ID | <uektQ-2Py-11@gated-at.bofh.it> |
On Wed, Aug 9, 2017 at 5:45 PM, Quentin Schulz <quentin.schulz@free-electrons.com> wrote: > To prepare an upcoming patch adding support for another PMIC that has > different startup and shutdown time, use driver_data of > platform_device_id instead of a fixed extended device attribute. > > By doing so, we also remove a lot of nested structures that aren't > useful. > > With this patch, a new PMIC can be easily supported by just filling > correctly its ax20x_info structure and adding a platform_device_id. > > Moreover, since we get rid of extended attributes, rename > axp20x_store_ext_attr to axp20x_store_attr and axp20x_show_ext_attr to > axp20x_show_attr. > > Signed-off-by: Quentin Schulz <quentin.schulz@free-electrons.com> Acked-by: Chen-Yu Tsai <wens@csie.org> [...] > + > +DEVICE_ATTR(startup, 0644, axp20x_show_attr_startup, axp20x_store_attr_startup); > +DEVICE_ATTR(shutdown, 0644, axp20x_show_attr_shutdown, > + axp20x_store_attr_shutdown); > You could use DEVICE_ATTR_RW(...) if you renamed the function names to fit the macro if you wanted.
[toc] | [next] | [standalone]
| From | Dmitry Torokhov <dmitry.torokhov@gmail.com> |
|---|---|
| Date | 2017-08-17 02:50 +0200 |
| Message-ID | <ufhax-5GE-7@gated-at.bofh.it> |
| In reply to | #1710790 |
On Mon, Aug 14, 2017 at 06:03:44PM +0800, Chen-Yu Tsai wrote: > On Wed, Aug 9, 2017 at 5:45 PM, Quentin Schulz > <quentin.schulz@free-electrons.com> wrote: > > To prepare an upcoming patch adding support for another PMIC that has > > different startup and shutdown time, use driver_data of > > platform_device_id instead of a fixed extended device attribute. > > > > By doing so, we also remove a lot of nested structures that aren't > > useful. > > > > With this patch, a new PMIC can be easily supported by just filling > > correctly its ax20x_info structure and adding a platform_device_id. > > > > Moreover, since we get rid of extended attributes, rename > > axp20x_store_ext_attr to axp20x_store_attr and axp20x_show_ext_attr to > > axp20x_show_attr. > > > > Signed-off-by: Quentin Schulz <quentin.schulz@free-electrons.com> > > Acked-by: Chen-Yu Tsai <wens@csie.org> Applied, thank you. > > [...] > > > + > > +DEVICE_ATTR(startup, 0644, axp20x_show_attr_startup, axp20x_store_attr_startup); > > +DEVICE_ATTR(shutdown, 0644, axp20x_show_attr_shutdown, > > + axp20x_store_attr_shutdown); > > > > You could use DEVICE_ATTR_RW(...) if you renamed the function names to > fit the macro if you wanted. -- Dmitry
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web