linux-i2c.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Wolfram Sang <wsa@the-dreams.de>
To: Irina Tirdea <irina.tirdea@intel.com>,
	Mika Westerberg <mika.westerberg@linux.intel.com>
Cc: linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org,
	Octavian Purdila <octavian.purdila@intel.com>,
	Laurentiu Palcu <laurentiu.palcu@intel.com>
Subject: Re: [PATCH 1/1] i2c: dln2: Pass forward ACPI companion
Date: Sat, 16 Apr 2016 23:33:04 +0200	[thread overview]
Message-ID: <20160416213304.GF1522@katana> (raw)
In-Reply-To: <1458845956-30991-1-git-send-email-irina.tirdea@intel.com>

[-- Attachment #1: Type: text/plain, Size: 1421 bytes --]

On Thu, Mar 24, 2016 at 08:59:16PM +0200, Irina Tirdea wrote:
> Share the ACPI companion for the platform device with the
> i2c adapter, so that the adapter has access to the properties
> defined in ACPI tables.
> 
> Signed-off-by: Irina Tirdea <irina.tirdea@intel.com>
> ---

Adding Mika for my question: A few drivers do this, does it make sense
to put this into the core?

Apart from that, looks good to me.

>  drivers/i2c/busses/i2c-dln2.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/i2c/busses/i2c-dln2.c b/drivers/i2c/busses/i2c-dln2.c
> index 1600edd..f2eb4f7 100644
> --- a/drivers/i2c/busses/i2c-dln2.c
> +++ b/drivers/i2c/busses/i2c-dln2.c
> @@ -19,6 +19,7 @@
>  #include <linux/i2c.h>
>  #include <linux/platform_device.h>
>  #include <linux/mfd/dln2.h>
> +#include <linux/acpi.h>
>  
>  #define DLN2_I2C_MODULE_ID		0x03
>  #define DLN2_I2C_CMD(cmd)		DLN2_CMD(cmd, DLN2_I2C_MODULE_ID)
> @@ -210,6 +211,7 @@ static int dln2_i2c_probe(struct platform_device *pdev)
>  	dln2->adapter.algo = &dln2_i2c_usb_algorithm;
>  	dln2->adapter.quirks = &dln2_i2c_quirks;
>  	dln2->adapter.dev.parent = dev;
> +	ACPI_COMPANION_SET(&dln2->adapter.dev, ACPI_COMPANION(&pdev->dev));
>  	dln2->adapter.dev.of_node = dev->of_node;
>  	i2c_set_adapdata(&dln2->adapter, dln2);
>  	snprintf(dln2->adapter.name, sizeof(dln2->adapter.name), "%s-%s-%d",
> -- 
> 1.9.1
> 

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

  reply	other threads:[~2016-04-16 21:33 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-24 18:59 [PATCH 1/1] i2c: dln2: Pass forward ACPI companion Irina Tirdea
2016-04-16 21:33 ` Wolfram Sang [this message]
2016-04-18  7:54   ` Mika Westerberg
2016-04-24 20:30 ` Wolfram Sang

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=20160416213304.GF1522@katana \
    --to=wsa@the-dreams.de \
    --cc=irina.tirdea@intel.com \
    --cc=laurentiu.palcu@intel.com \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mika.westerberg@linux.intel.com \
    --cc=octavian.purdila@intel.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).