public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@intel.com>
To: Abdurrahman Hussain <abdurrahman@nexthop.ai>
Cc: Michal Simek <michal.simek@amd.com>,
	Andi Shyti <andi.shyti@kernel.org>,
	linux-arm-kernel@lists.infradead.org, linux-i2c@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] i2c: xiic: add ACPI support
Date: Wed, 21 Jan 2026 09:36:03 +0100	[thread overview]
Message-ID: <aXCP87og_n1DLUKL@black.igk.intel.com> (raw)
In-Reply-To: <20260115002846.25389-1-abdurrahman@nexthop.ai>

On Thu, Jan 15, 2026 at 12:28:46AM +0000, Abdurrahman Hussain wrote:
> Use generic device property accessors.
> Make the clock optional assuming it's managed by firmware.

The generalisation parts are okay in a sense for prototyping, for ACPI-based
platforms, we want to see the proper _HID allocated by a platform vendor
(and maybe accompanied _CID allocated by the IP vendor).

Also you need to reshuffle header inclusions (removing of* and adding proper
headers following IWYU principle).

...

Add

	struct device *dev = &pdev->dev;

to the top of the function and use it everywhere.

>  	i2c->adap.dev.of_node = pdev->dev.of_node;
> +	ACPI_COMPANION_SET(&i2c->adap.dev, ACPI_COMPANION(&pdev->dev));

Instead of two lines, switch to

	device_set_node(...);

...

> -	i2c->clk = devm_clk_get_enabled(&pdev->dev, NULL);
> +	i2c->clk = devm_clk_get_optional_enabled(&pdev->dev, NULL);
>  	if (IS_ERR(i2c->clk))
>  		return dev_err_probe(&pdev->dev, PTR_ERR(i2c->clk),
>  				     "failed to enable input clock.\n");

This needs to be in the separate change explaining why this is okay to go with.

-- 
With Best Regards,
Andy Shevchenko



      parent reply	other threads:[~2026-01-21  8:36 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-15  0:28 [PATCH] i2c: xiic: add ACPI support Abdurrahman Hussain
2026-01-15 13:02 ` Wolfram Sang
2026-01-15 19:04   ` Abdurrahman Hussain
2026-01-16  7:30     ` Michal Simek
2026-01-16 20:12       ` Abdurrahman Hussain
2026-01-21  8:36 ` Andy Shevchenko [this message]

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=aXCP87og_n1DLUKL@black.igk.intel.com \
    --to=andriy.shevchenko@intel.com \
    --cc=abdurrahman@nexthop.ai \
    --cc=andi.shyti@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=michal.simek@amd.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