From: Hans de Goede <hdegoede@redhat.com>
To: Andy Shevchenko <andy.shevchenko@gmail.com>
Cc: Mark Gross <markgross@kernel.org>,
Andy Shevchenko <andy@kernel.org>,
Stephan Gerhold <stephan@gerhold.net>,
Platform Driver <platform-driver-x86@vger.kernel.org>
Subject: Re: [PATCH 1/6] platform/x86: x86-android-tablets: Add battery swnode support
Date: Sun, 6 Feb 2022 20:10:36 +0100 [thread overview]
Message-ID: <b4dd20bc-eefe-a794-ab67-e242388451b1@redhat.com> (raw)
In-Reply-To: <CAHp75Vep66axJzXAdBQa4qzxRZG-Nzf=YeVSZHAg7enkwDLTAw@mail.gmail.com>
Hi,
On 2/5/22 21:41, Andy Shevchenko wrote:
> On Sat, Feb 5, 2022 at 9:14 PM Hans de Goede <hdegoede@redhat.com> wrote:
>>
>> power_supply_get_battery_info() which is used by charger and fuel-gauge
>> drivers on x86-android-tablets, expects the battery properties to be
>> described in a stand-alone battery fwnode which is then referenced
>> from both the charger and fuel-gauge device's fwnodes.
>>
>> Add support for registering + unregistering a swnode for this.
>
> All non-commented looks good to me,
> Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Just to be clear, you mean that I may add your Reviewed-by
tag to all patches in this series to which you did not comment,
correct ?
Regards,
Hans
>
>> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
>> ---
>> drivers/platform/x86/x86-android-tablets.c | 11 +++++++++++
>> 1 file changed, 11 insertions(+)
>>
>> diff --git a/drivers/platform/x86/x86-android-tablets.c b/drivers/platform/x86/x86-android-tablets.c
>> index 3120acf9837c..80d113c41623 100644
>> --- a/drivers/platform/x86/x86-android-tablets.c
>> +++ b/drivers/platform/x86/x86-android-tablets.c
>> @@ -146,6 +146,7 @@ struct x86_serdev_info {
>> struct x86_dev_info {
>> char *invalid_aei_gpiochip;
>> const char * const *modules;
>> + const struct software_node *bat_swnode;
>> struct gpiod_lookup_table * const *gpiod_lookup_tables;
>> const struct x86_i2c_client_info *i2c_client_info;
>> const struct platform_device_info *pdev_info;
>> @@ -727,6 +728,7 @@ static struct i2c_client **i2c_clients;
>> static struct platform_device **pdevs;
>> static struct serdev_device **serdevs;
>> static struct gpiod_lookup_table * const *gpiod_lookup_tables;
>> +static const struct software_node *bat_swnode;
>> static void (*exit_handler)(void);
>>
>> static __init int x86_instantiate_i2c_client(const struct x86_dev_info *dev_info,
>> @@ -850,6 +852,8 @@ static void x86_android_tablet_cleanup(void)
>>
>> for (i = 0; gpiod_lookup_tables && gpiod_lookup_tables[i]; i++)
>> gpiod_remove_lookup_table(gpiod_lookup_tables[i]);
>> +
>> + software_node_unregister(bat_swnode);
>> }
>>
>> static __init int x86_android_tablet_init(void)
>> @@ -886,6 +890,13 @@ static __init int x86_android_tablet_init(void)
>> for (i = 0; dev_info->modules && dev_info->modules[i]; i++)
>> request_module(dev_info->modules[i]);
>>
>> + bat_swnode = dev_info->bat_swnode;
>> + if (bat_swnode) {
>> + ret = software_node_register(bat_swnode);
>> + if (ret)
>> + return ret;
>> + }
>> +
>> gpiod_lookup_tables = dev_info->gpiod_lookup_tables;
>> for (i = 0; gpiod_lookup_tables && gpiod_lookup_tables[i]; i++)
>> gpiod_add_lookup_table(gpiod_lookup_tables[i]);
>> --
>> 2.33.1
>>
>
>
next prev parent reply other threads:[~2022-02-06 19:17 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-05 19:13 [PATCH 1/6] platform/x86: x86-android-tablets: Add battery swnode support Hans de Goede
2022-02-05 19:13 ` [PATCH 2/6] platform/x86: x86-android-tablets: Add Asus ME176C/TF103C charger and fuelgauge props Hans de Goede
2022-02-05 19:13 ` [PATCH 3/6] platform/x86: x86-android-tablets: Add x86_android_tablet_get_gpiod() helper Hans de Goede
2022-02-05 19:13 ` [PATCH 4/6] platform/x86: x86-android-tablets: Add lid-switch gpio-keys pdev to Asus ME176C + TF103C Hans de Goede
2022-02-05 20:40 ` Andy Shevchenko
2022-02-06 19:22 ` Hans de Goede
2022-02-06 19:50 ` Andy Shevchenko
2022-02-11 9:51 ` Hans de Goede
2022-02-05 19:13 ` [PATCH 5/6] platform/x86: x86-android-tablets: Add IRQ to Asus ME176C accelerometer info Hans de Goede
2022-02-05 19:13 ` [PATCH 6/6] platform/x86: x86-android-tablets: Add Nextbook Ares 8 data Hans de Goede
2022-02-05 20:41 ` [PATCH 1/6] platform/x86: x86-android-tablets: Add battery swnode support Andy Shevchenko
2022-02-06 19:10 ` Hans de Goede [this message]
2022-02-06 19:46 ` Andy Shevchenko
2022-02-11 9:51 ` Hans de Goede
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=b4dd20bc-eefe-a794-ab67-e242388451b1@redhat.com \
--to=hdegoede@redhat.com \
--cc=andy.shevchenko@gmail.com \
--cc=andy@kernel.org \
--cc=markgross@kernel.org \
--cc=platform-driver-x86@vger.kernel.org \
--cc=stephan@gerhold.net \
/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