From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Biju Das <biju.das.jz@bp.renesas.com>
Cc: Sebastian Reichel <sre@kernel.org>,
linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org,
Biju Das <biju.das.au@gmail.com>
Subject: Re: [PATCH 1/2] power: supply: bq24257_charger: Make chip type and name in sync
Date: Mon, 4 Sep 2023 13:07:50 +0300 [thread overview]
Message-ID: <ZPWsdjlFvUzeFy45@smile.fi.intel.com> (raw)
In-Reply-To: <20230902193331.83672-2-biju.das.jz@bp.renesas.com>
On Sat, Sep 02, 2023 at 08:33:30PM +0100, Biju Das wrote:
> Add struct bq2425x_chip_info to make enum bq2425x_chip and it's name in
> sync and replace chip->info in struct bq24257_device and add struct
> bq2425x_chip_info as match data for OF/ACPI/ID tables.
>
> Simpilfy probe() by replacing acpi_match_device() and id lookup for
> retrieving match data by using i2c_get_match_data().
>
> Drop bq2425x_chip_name as there is no user and also drop the comment
> related to syncing chip and name as it is taken care by struct
> bq2425x_chip_info.
...
> - if (ACPI_HANDLE(dev)) {
> - acpi_id = acpi_match_device(dev->driver->acpi_match_table,
> - &client->dev);
> - if (!acpi_id) {
> - dev_err(dev, "Failed to match ACPI device\n");
> - return -ENODEV;
> - }
> - bq->chip = (enum bq2425x_chip)acpi_id->driver_data;
> - } else {
> - bq->chip = (enum bq2425x_chip)id->driver_data;
> - }
Do we still need acpi.h after this change?
--
With Best Regards,
Andy Shevchenko
next prev parent reply other threads:[~2023-09-04 10:07 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-02 19:33 [PATCH 0/2] Match data improvements for bq24257_charger driver Biju Das
2023-09-02 19:33 ` [PATCH 1/2] power: supply: bq24257_charger: Make chip type and name in sync Biju Das
2023-09-04 10:07 ` Andy Shevchenko [this message]
2023-09-10 7:10 ` Biju Das
2023-09-11 10:15 ` Andy Shevchenko
2023-09-12 21:49 ` Sebastian Reichel
2023-09-13 11:23 ` Andy Shevchenko
2023-09-02 19:33 ` [PATCH 2/2] power: supply: bq24257_charger: Some cleanups Biju Das
2023-09-04 10:08 ` Andy Shevchenko
2023-09-12 21:52 ` [PATCH 0/2] Match data improvements for bq24257_charger driver Sebastian Reichel
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=ZPWsdjlFvUzeFy45@smile.fi.intel.com \
--to=andriy.shevchenko@linux.intel.com \
--cc=biju.das.au@gmail.com \
--cc=biju.das.jz@bp.renesas.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=sre@kernel.org \
/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.