From: Andy Shevchenko <andriy.shevchenko@intel.com>
To: Mark Hasemeyer <markhas@chromium.org>
Cc: LKML <linux-kernel@vger.kernel.org>,
Sudeep Holla <sudeep.holla@arm.com>,
AngeloGioacchino Del Regno
<angelogioacchino.delregno@collabora.com>,
Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>,
Konrad Dybcio <konrad.dybcio@linaro.org>,
Raul Rangel <rrangel@chromium.org>,
Tzung-Bi Shih <tzungbi@kernel.org>,
Mika Westerberg <mika.westerberg@linux.intel.com>,
Wolfram Sang <wsa@kernel.org>,
linux-acpi@vger.kernel.org, linux-i2c@vger.kernel.org
Subject: Re: [PATCH v4 03/24] i2c: acpi: Modify i2c_acpi_get_irq() to use resource
Date: Sat, 6 Jan 2024 16:48:54 +0200 [thread overview]
Message-ID: <ZZloVhod_hbhDTGP@smile.fi.intel.com> (raw)
In-Reply-To: <20240102140734.v4.3.Ib65096357993ff602e7dd0000dd59a36571c48d8@changeid>
On Tue, Jan 02, 2024 at 02:07:27PM -0700, Mark Hasemeyer wrote:
> The i2c_acpi_irq_context structure provides redundant information that
> can be provided with struct resource.
>
> Refactor i2c_acpi_get_irq() to use struct resource instead of struct
> i2c_acpi_irq_context.
...
> ret = acpi_dev_get_resources(adev, &resource_list,
> - i2c_acpi_add_irq_resource, &irq_ctx);
> + i2c_acpi_add_irq_resource, r);
Up to you, but you can make it a single line.
ret = acpi_dev_get_resources(adev, &resource_list, i2c_acpi_add_irq_resource, r);
> if (ret < 0)
> return ret;
...
> +++ b/drivers/i2c/i2c-core-base.c
> + struct resource r = {};
Needs ioport.h.
...
> + irq = i2c_acpi_get_irq(client, &r);
> + if (r.flags & IORESOURCE_IRQ_WAKECAPABLE)
Ditto.
> client->flags |= I2C_CLIENT_WAKE;
> }
...
> +++ b/drivers/i2c/i2c-core.h
> +int i2c_acpi_get_irq(struct i2c_client *client, struct resource *r);
> +static inline int i2c_acpi_get_irq(struct i2c_client *client, struct resource *r)
Needs a forward declaration (besides the inclusion block is a total mess
in this file).
--
With Best Regards,
Andy Shevchenko
next prev parent reply other threads:[~2024-01-06 14:49 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-02 21:07 [PATCH v4 00/24] Improve IRQ wake capability reporting and update the cros_ec driver to use it Mark Hasemeyer
2024-01-02 21:07 ` [PATCH v4 02/24] gpiolib: acpi: Modify acpi_dev_irq_wake_get_by() to use resource Mark Hasemeyer
2024-01-06 14:44 ` Andy Shevchenko
2024-01-08 19:08 ` Mark Hasemeyer
2024-01-02 21:07 ` [PATCH v4 03/24] i2c: acpi: Modify i2c_acpi_get_irq() " Mark Hasemeyer
2024-01-06 14:48 ` Andy Shevchenko [this message]
2024-01-02 21:07 ` [PATCH v4 21/24] device property: Modify fwnode irq_get() " Mark Hasemeyer
2024-01-06 14:52 ` Andy Shevchenko
2024-01-09 20:47 ` Rob Herring
2024-01-02 21:07 ` [PATCH v4 22/24] device property: Update functions to use EXPORT_SYMBOL_GPL() Mark Hasemeyer
2024-01-08 18:32 ` Sakari Ailus
2024-01-22 9:14 ` [PATCH v4 00/24] Improve IRQ wake capability reporting and update the cros_ec driver to use it Matthias Brugger
2024-02-14 17:57 ` (subset) " Bjorn Andersson
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=ZZloVhod_hbhDTGP@smile.fi.intel.com \
--to=andriy.shevchenko@intel.com \
--cc=angelogioacchino.delregno@collabora.com \
--cc=konrad.dybcio@linaro.org \
--cc=krzysztof.kozlowski@linaro.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=markhas@chromium.org \
--cc=mika.westerberg@linux.intel.com \
--cc=robh@kernel.org \
--cc=rrangel@chromium.org \
--cc=sudeep.holla@arm.com \
--cc=tzungbi@kernel.org \
--cc=wsa@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox