linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Rafael J. Wysocki" <rjw@rjwysocki.net>
To: Lan Tianyu <tianyu.lan@intel.com>
Cc: Mika Westerberg <mika.westerberg@linux.intel.com>,
	Wolfram Sang <wsa@the-dreams.de>,
	awilliam@redhat.com, lenb@kernel.org, linux-i2c@vger.kernel.org,
	linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org
Subject: Re: [Patch V2 9/9] I2C/ACPI: Add CONFIG_I2C_ACPI config
Date: Mon, 19 May 2014 22:23:12 +0200	[thread overview]
Message-ID: <5242415.8zZ5y8lb01@vostro.rjw.lan> (raw)
In-Reply-To: <5379D28F.1020200@intel.com>

On Monday, May 19, 2014 05:44:47 PM Lan Tianyu wrote:
> On 05/19/2014 04:49 PM, Mika Westerberg wrote:
> > On Sat, May 17, 2014 at 07:48:34PM +0200, Wolfram Sang wrote:
> >> On Tue, Apr 29, 2014 at 11:16:09AM +0300, Mika Westerberg wrote:
> >>> On Mon, Apr 28, 2014 at 10:27:48PM +0800, Lan Tianyu wrote:
> >>>> This patch is to add CONFIG_I2C_ACPI. Current there is a race between
> >>>> removing I2C ACPI operation region and ACPI AML code accessing.
> >>>> So make i2c core built-in if CONFIG_I2C_ACPI is set.
> >>>>
> >>>> Signed-off-by: Lan Tianyu <tianyu.lan@intel.com>
> >>>> ---
> >>>>   drivers/i2c/Kconfig  | 17 ++++++++++++++++-
> >>>>   drivers/i2c/Makefile |  2 +-
> >>>>   include/linux/i2c.h  |  2 +-
> >>>>   3 files changed, 18 insertions(+), 3 deletions(-)
> >>>>
> >>>> diff --git a/drivers/i2c/Kconfig b/drivers/i2c/Kconfig
> >>>> index 7b7ea32..c670d49 100644
> >>>> --- a/drivers/i2c/Kconfig
> >>>> +++ b/drivers/i2c/Kconfig
> >>>> @@ -2,7 +2,9 @@
> >>>>   # I2C subsystem configuration
> >>>>   #
> >>>>
> >>>> -menuconfig I2C
> >>>> +menu "I2C support"
> >>>> +
> >>>> +config I2C
> >>>>   	tristate "I2C support"
> >>>>   	select RT_MUTEXES
> >>>>   	---help---
> >>>> @@ -21,6 +23,17 @@ menuconfig I2C
> >>>>   	  This I2C support can also be built as a module.  If so, the module
> >>>>   	  will be called i2c-core.
> >>>>
> >>>> +config I2C_ACPI
> >>>> +	bool "I2C ACPI support"
> >>>> +	select I2C
> >>>> +	depends on ACPI
> >>>> +	default y
> >>>> +	help
> >>>> +	  Say Y here if you want to enable I2C ACPI function. ACPI table
> >>>> +	  provides I2C slave devices' information to enumerate these devices.
> >>>> +	  This option also allows ACPI AML code to access I2C slave devices
> >>>> +	  via I2C ACPI operation region to fulfill ACPI method.
> >>>
> >>> I would prefer something like:
> >>>
> >>> Say Y here if you want to enable ACPI I2C support. This includes support
> >>> for automatic enumeration of I2C slave devices and support for ACPI I2C
> >>> Operation Regions. Operation Regions allow firmware (BIOS) code to
> >>> access I2C slave devices, such as smart batteries through an I2C host
> >>> controller driver.
> >>>
> >>> But it is really up to you so,
> >>>
> >>> Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>
> >>
> >> How does this fit into the context of
> >> 55e71edb81b2b45273e7b284cce13ff24bde846f ("i2c: move ACPI helpers into
> >> the core")?
> >
> > With that commit we moved ACPI code to live inside I2C module (given
> > that it was compiled as a module). However, you still can remove that
> > module from userspace.
> >
> > With this patch we make sure that the I2C core can't be removed if you
> > have ACPI enabled. This prevents the potential race.
> >
> 
> Yes, these are the two patches' purposes. Thanks Mika's explanation. If you 
> like, I can merge them into one patch.

I think that would be easier to follow.

Thanks!

-- 
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.

  reply	other threads:[~2014-05-19 20:06 UTC|newest]

Thread overview: 79+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-16 13:24 [PATCH 0/9] I2C ACPI operation region handler support Lan Tianyu
2014-04-16 13:24 ` [PATCH 1/9] ACPICA: Executer: Fix buffer allocation issue for generic_serial_bus region field accesses Lan Tianyu
2014-04-21 21:38   ` Rafael J. Wysocki
2014-04-22  1:14     ` Lan Tianyu
2014-04-16 13:24 ` [PATCH 2/9] ACPICA: Export acpi_buffer_to_resource symbol Lan Tianyu
2014-04-16 13:24 ` [PATCH 3/9] ACPI: Add acpi_bus_attach_private_data() to facilitate to attach data to ACPI handle Lan Tianyu
2014-04-16 13:24 ` [PATCH 4/9] ACPI/Thermal: Use acpi_bus_attach_private_data() to attach private data Lan Tianyu
2014-04-16 13:24 ` [PATCH 5/9] I2C: Add smbus quick read/write helper function Lan Tianyu
2014-04-16 13:24 ` [PATCH 6/9] I2C: Add smbus word/block process call " Lan Tianyu
2014-04-16 13:24 ` [PATCH 7/9] I2C/ACPI: Add i2c ACPI operation region support Lan Tianyu
2014-04-16 13:24 ` [PATCH 8/9] I2C/ACPI: Move ACPI related code to i2c-acpi.c Lan Tianyu
2014-04-16 13:24 ` [PATCH 9/9] I2C/ACPI: Add CONFIG_I2C_ACPI config Lan Tianyu
2014-04-16 13:33 ` [PATCH 0/9] I2C ACPI operation region handler support Lan Tianyu
2014-04-16 16:35 ` Adam Williamson
2014-04-22  6:24 ` [Resend Patch " Lan Tianyu
2014-04-22  6:24   ` [Resend Patch 1/9] ACPICA: Executer: Fix buffer allocation issue for generic_serial_bus region field accesses Lan Tianyu
2014-04-22 11:21     ` Mika Westerberg
2014-04-22  6:24   ` [Resend Patch 2/9] ACPICA: Export acpi_buffer_to_resource symbol Lan Tianyu
2014-04-22 11:21     ` Mika Westerberg
2014-04-22  6:24   ` [Resend Patch 3/9] ACPI: Add acpi_bus_attach_private_data() to facilitate to attach data to ACPI handle Lan Tianyu
2014-04-22 11:23     ` Mika Westerberg
2014-04-22  6:24   ` [Resend Patch 4/9] ACPI/Thermal: Use acpi_bus_attach_private_data() to attach private data Lan Tianyu
2014-04-22 11:24     ` Mika Westerberg
2014-04-22  6:24   ` [Resend Patch 5/9] I2C: Add smbus quick read/write helper function Lan Tianyu
2014-04-22 11:24     ` Mika Westerberg
2014-04-22  6:24   ` [Resend Patch 6/9] I2C: Add smbus word/block process call " Lan Tianyu
2014-04-22 11:26     ` Mika Westerberg
2014-04-22  6:24   ` [Resend Patch 7/9] I2C/ACPI: Add i2c ACPI operation region support Lan Tianyu
2014-04-22 11:36     ` Mika Westerberg
2014-04-23  1:53       ` Lan Tianyu
2014-04-23  7:28         ` Mika Westerberg
2014-04-23  7:17           ` Lan Tianyu
2014-04-22  6:24   ` [Resend Patch 8/9] I2C/ACPI: Move ACPI related code to i2c-acpi.c Lan Tianyu
2014-04-22 11:38     ` Mika Westerberg
2014-04-22  6:24   ` [Resend Patch 9/9] I2C/ACPI: Add CONFIG_I2C_ACPI config Lan Tianyu
2014-04-22 11:45     ` Mika Westerberg
2014-04-23  5:39       ` Lan Tianyu
2014-04-23  6:47         ` Zheng, Lv
2014-04-23  7:40           ` Mika Westerberg
2014-04-23 23:03   ` [Resend Patch 0/9] I2C ACPI operation region handler support Adam Williamson
2014-04-28 14:27   ` [Patch V2 " Lan Tianyu
2014-04-28 14:27     ` [Patch V2 1/9] ACPICA: Executer: Fix buffer allocation issue for generic_serial_bus region field accesses Lan Tianyu
2014-04-28 17:52       ` Adam Williamson
2014-04-28 18:08         ` Adam Williamson
2014-04-28 22:50           ` Rafael J. Wysocki
2014-04-29 11:31             ` Wolfram Sang
2014-04-29 21:37               ` Rafael J. Wysocki
2014-04-28 14:27     ` [Patch V2 2/9] ACPICA: Export acpi_buffer_to_resource symbol Lan Tianyu
2014-04-28 14:27     ` [Patch V2 3/9] ACPI: Add acpi_bus_attach_private_data() to facilitate to attach data to ACPI handle Lan Tianyu
2014-04-28 14:27     ` [Patch V2 4/9] ACPI/Thermal: Use acpi_bus_attach_private_data() to attach private data Lan Tianyu
2014-04-28 14:27     ` [Patch V2 5/9] I2C: Add smbus quick read/write helper function Lan Tianyu
2014-05-17  9:41       ` Wolfram Sang
2014-05-17 13:13         ` Lan Tianyu
2014-05-17 17:15           ` Wolfram Sang
2014-04-28 14:27     ` [Patch V2 6/9] I2C: Add smbus word/block process call " Lan Tianyu
2014-05-17 10:21       ` Wolfram Sang
2014-05-17 13:59         ` Lan Tianyu
2014-05-17 17:17           ` Wolfram Sang
2014-05-19  9:23             ` Lan Tianyu
2014-04-28 14:27     ` [Patch V2 7/9] I2C/ACPI: Add i2c ACPI operation region support Lan Tianyu
2014-04-29  8:02       ` Mika Westerberg
2014-04-28 14:27     ` [Patch V2 8/9] I2C/ACPI: Move ACPI related code to i2c-acpi.c Lan Tianyu
2014-04-28 14:27     ` [Patch V2 9/9] I2C/ACPI: Add CONFIG_I2C_ACPI config Lan Tianyu
2014-04-29  8:16       ` Mika Westerberg
2014-05-17 17:48         ` Wolfram Sang
2014-05-19  8:49           ` Mika Westerberg
2014-05-19  9:44             ` Lan Tianyu
2014-05-19 20:23               ` Rafael J. Wysocki [this message]
2014-04-28 22:51     ` [Patch V2 0/9] I2C ACPI operation region handler support Rafael J. Wysocki
2014-04-29  1:54       ` Lan Tianyu
2014-04-29 15:47         ` Rafael J. Wysocki
2014-05-13 13:09     ` Rolf Eike Beer
2014-05-13 14:06       ` Lan Tianyu
2014-05-15  7:50         ` Rolf Eike Beer
2014-05-15 14:49           ` Lan Tianyu
2014-05-16  8:43             ` Rolf Eike Beer
2014-05-20 14:17           ` Rolf Eike Beer
2014-05-22 15:14             ` Lan Tianyu
2014-05-23  6:55               ` Rolf Eike Beer

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=5242415.8zZ5y8lb01@vostro.rjw.lan \
    --to=rjw@rjwysocki.net \
    --cc=awilliam@redhat.com \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mika.westerberg@linux.intel.com \
    --cc=tianyu.lan@intel.com \
    --cc=wsa@the-dreams.de \
    /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).