From: Mika Westerberg <mika.westerberg@linux.intel.com>
To: Wolfram Sang <wsa@the-dreams.de>
Cc: linux-i2c@vger.kernel.org, linux-acpi@vger.kernel.org,
linux-kernel@vger.kernel.org, Lan Tianyu <tianyu.lan@intel.com>,
Jean Delvare <jdelvare@suse.de>
Subject: Re: [PATCH v2] i2c: move acpi code back into the core
Date: Thu, 25 Sep 2014 12:02:27 +0300 [thread overview]
Message-ID: <20140925090227.GE1786@lahna.fi.intel.com> (raw)
In-Reply-To: <1411594591-5048-1-git-send-email-wsa@the-dreams.de>
On Wed, Sep 24, 2014 at 11:36:31PM +0200, Wolfram Sang wrote:
> Commit 5d98e61d337c ("I2C/ACPI: Add i2c ACPI operation region support")
> renamed the i2c-core module. This may cause regressions for
> distributions, so put the ACPI code back into the core.
>
> Reported-by: Jean Delvare <jdelvare@suse.de>
> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
> Cc: Mika Westerberg <mika.westerberg@linux.intel.com>
Tested-by: Mika Westerberg <mika.westerberg@linux.intel.com>
One comment though,
> Cc: Lan Tianyu <tianyu.lan@intel.com>
> Cc: Jean Delvare <jdelvare@suse.de>
> ---
> +#if defined(CONFIG_ACPI)
> +struct acpi_i2c_handler_data {
> + struct acpi_connection_info info;
> + struct i2c_adapter *adapter;
> +};
> +
> +struct gsb_buffer {
> + u8 status;
> + u8 len;
> + union {
> + u16 wdata;
> + u8 bdata;
> + u8 data[0];
> + };
> +} __packed;
These two structures should be inside CONFIG_ACPI_I2C_OPREGION because
they are used in that code. However, this still works fine now as you
can't select CONFIG_ACPI_I2C_OPREGION without CONFIG_ACPI.
> +
> +static int acpi_i2c_add_resource(struct acpi_resource *ares, void *data)
> +{
> + struct i2c_board_info *info = data;
> +
> + if (ares->type == ACPI_RESOURCE_TYPE_SERIAL_BUS) {
> + struct acpi_resource_i2c_serialbus *sb;
> +
> + sb = &ares->data.i2c_serial_bus;
> + if (sb->type == ACPI_RESOURCE_SERIAL_TYPE_I2C) {
> + info->addr = sb->slave_address;
> + if (sb->access_mode == ACPI_I2C_10BIT_MODE)
> + info->flags |= I2C_CLIENT_TEN;
> + }
> + } else if (info->irq < 0) {
> + struct resource r;
> +
> + if (acpi_dev_resource_interrupt(ares, 0, &r))
> + info->irq = r.start;
> + }
> +
> + /* Tell the ACPI core to skip this resource */
> + return 1;
> +}
next prev parent reply other threads:[~2014-09-25 9:03 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-24 21:36 [PATCH v2] i2c: move acpi code back into the core Wolfram Sang
2014-09-24 21:36 ` Wolfram Sang
2014-09-25 7:26 ` Lan Tianyu
2014-09-25 7:26 ` Lan Tianyu
2014-09-25 9:02 ` Mika Westerberg [this message]
[not found] ` <1411594591-5048-1-git-send-email-wsa-z923LK4zBo2bacvFa/9K2g@public.gmane.org>
2014-09-30 10:55 ` Jean Delvare
2014-09-30 10:55 ` Jean Delvare
[not found] ` <20140930125520.61b57882-R0o5gVi9kd7kN2dkZ6Wm7A@public.gmane.org>
2014-09-30 16:03 ` Mika Westerberg
2014-09-30 16:03 ` Mika Westerberg
2014-09-30 18:46 ` Jean Delvare
2014-09-30 20:34 ` Rafael J. Wysocki
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=20140925090227.GE1786@lahna.fi.intel.com \
--to=mika.westerberg@linux.intel.com \
--cc=jdelvare@suse.de \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--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 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.