From: Chen-Yu Tsai <wens@csie.org>
To: Quentin Schulz <quentin.schulz@free-electrons.com>
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>,
Chen-Yu Tsai <wens@csie.org>, Lee Jones <lee.jones@linaro.org>,
Hans de Goede <hdegoede@redhat.com>,
"linux-input@vger.kernel.org" <linux-input@vger.kernel.org>,
linux-kernel <linux-kernel@vger.kernel.org>,
Thomas Petazzoni <thomas.petazzoni@free-electrons.com>,
Maxime Ripard <maxime.ripard@free-electrons.com>
Subject: Re: [PATCH v3 1/2] Input: axp20x-pek: use driver_data of platform_device_id instead of extended attributes
Date: Mon, 14 Aug 2017 18:03:44 +0800 [thread overview]
Message-ID: <CAGb2v65xoUZA+AGb+1LEba-ccmDdLo6YyAB1nqo2uKUN7x=2kA@mail.gmail.com> (raw)
In-Reply-To: <df8eb78e18692292f5206a57c88fcefe6a1754de.1502271751.git-series.quentin.schulz@free-electrons.com>
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.
next prev parent reply other threads:[~2017-08-14 10:04 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-09 9:45 [PATCH v3 0/2] add support for AXP22X/AXP288/AXP8XX PEK Quentin Schulz
2017-08-09 9:45 ` [PATCH v3 1/2] Input: axp20x-pek: use driver_data of platform_device_id instead of extended attributes Quentin Schulz
2017-08-14 10:03 ` Chen-Yu Tsai [this message]
2017-08-17 0:46 ` Dmitry Torokhov
2017-08-09 9:45 ` [PATCH v3 2/2] Input: axp20x-pek: add support for AXP221 PEK Quentin Schulz
2017-08-17 0:46 ` Dmitry Torokhov
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='CAGb2v65xoUZA+AGb+1LEba-ccmDdLo6YyAB1nqo2uKUN7x=2kA@mail.gmail.com' \
--to=wens@csie.org \
--cc=dmitry.torokhov@gmail.com \
--cc=hdegoede@redhat.com \
--cc=lee.jones@linaro.org \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=maxime.ripard@free-electrons.com \
--cc=quentin.schulz@free-electrons.com \
--cc=thomas.petazzoni@free-electrons.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).