Re: [Patch V2 0/9] I2C ACPI operation region handler support

2014-05-22 Thread Rolf Eike Beer
Lan Tianyu wrote:
> On 05/20/2014 10:17 PM, Rolf Eike Beer wrote:

> > It may be that I have taken the wrong ACPI files. This is the result of a
> > fresh run of acpidump, together with the most recent dmesg.log, just in
> > case I messed it up.
> 
>   I have check the log. I2C ACPI operation region targets to I2C 
> controller
> which has one ACPI node in the ACPI table and is associated with one I2C
> adapter. Graphic with one ACPI handle registers several I2C adapters. This
> causes attach data to the ACPI handle with the same handler several time.
> The ACPICA function will return ALREADY EXIST error code and causes the log
> you mentioned. There is no I2C ACPI operation region under graphic device
> node and so not break function. To avoid these noise logs, I make them only
> appear under dynamic debug mode in the my V3 patchset.

Hi,

thanks for the clarification.

Greetings,

Eike
-- 
Rolf Eike Beer, emlix GmbH, http://www.emlix.com
Fon +49 551 30664-0, Fax +49 551 30664-11
Bertha-von-Suttner-Str. 9, 37085 Göttingen, Germany
Sitz der Gesellschaft: Göttingen, Amtsgericht Göttingen HR B 3160
Geschäftsführung: Dr. Uwe Kracke, Ust-IdNr.: DE 205 198 055

emlix - smart embedded open source


signature.asc
Description: This is a digitally signed message part.


Re: [Patch V2 0/9] I2C ACPI operation region handler support

2014-05-22 Thread Lan Tianyu

On 05/20/2014 10:17 PM, Rolf Eike Beer wrote:

Rolf Eike Beer wrote:

Lan Tianyu wrote:

On 05/13/2014 09:09 PM, Rolf Eike Beer wrote:

Am Montag, 28. April 2014, 22:27:39 schrieb Lan Tianyu:

ACPI 5.0 spec(5.5.2.4.5) defines GenericSerialBus(i2c, spi, uart)
operation
region. It allows ACPI aml code able to access such kind of devices to
implement some ACPI standard method.

On the Asus T100TA, Bios use GenericSerialBus operation region to
access
i2c device to get battery info. So battery function depends on the I2C
operation region support. Here is the bug link.
https://bugzilla.kernel.org/show_bug.cgi?id=69011



I have tested this series and got some errors, but no additional
functionality:



this is an Aava Inari 8 tablet (pre-release hardware). Please find the DSDT
and the dmesg.log attached.


It may be that I have taken the wrong ACPI files. This is the result of a
fresh run of acpidump, together with the most recent dmesg.log, just in case
I messed it up.


Hi Rolf:
	I have check the log. I2C ACPI operation region targets to I2C controller which 
has one ACPI node in the ACPI table and is associated with one I2C adapter. 
Graphic with one ACPI handle registers several I2C adapters. This causes attach 
data to the ACPI handle with the same handler several time. The ACPICA function 
will return ALREADY EXIST error code and causes the log you mentioned. There is 
no I2C ACPI operation region under graphic device node and so not break 
function. To avoid these noise logs, I make them only appear under dynamic debug 
mode in the my V3 patchset.





Kernel now is at 60b5f90+some patches:

8e7bd6f pinctrl: baytrail: Register GPIO chip after chip->to_irq is set
c4b2230 pinctrl: baytrail: Add back Baytrail-T ACPI ID
32f3364 gpio: Add support for Intel SoC PMIC (Crystal Cove)
088ee81 mfd: intel_soc_pmic: Build files
5315135 mfd: intel_soc_pmic: Crystal Cove support
8b5ed0b mfd: intel_soc_pmic: I2C interface
b18979f mfd: intel_soc_pmic: Core driver
5200b75 add debugging
   (This is the debug patch Lan Tianyu sent as reply to the previous mail)
bd3e6c6 I2C/ACPI: Add CONFIG_I2C_ACPI config
947f0a1 I2C/ACPI: Move ACPI related code to i2c-acpi.c
534f182 I2C/ACPI: Add i2c ACPI operation region support
32384d4 I2C: Add smbus word/block process call helper function
aa6459e I2C: Add smbus quick read/write helper function
51825ed ACPI/Thermal: Use acpi_bus_attach_private_data() to attach private data
95e9e92 ACPI: Add acpi_bus_attach_private_data() to facilitate to attach data 
to ACPI handle
cc6fecb ACPICA: Export acpi_buffer_to_resource symbol
ad38de6 ACPI / LPSS: custom power domain for LPSS
b0caadf ACPI / PM: Export rest of the subsys functions
22a7210 ACPI / platform: add another ID for Broadcom Bluetooth and GPS chips
  (this just adds AAM4752 as another platform id)
000627d ACPI / platform: add IDs for Broadcom Bluetooth and GPS chips

Eike



--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [Patch V2 0/9] I2C ACPI operation region handler support

2014-05-15 Thread Lan Tianyu

On 05/15/2014 03:50 PM, Rolf Eike Beer wrote:

Lan Tianyu wrote:

On 05/13/2014 09:09 PM, Rolf Eike Beer wrote:

Am Montag, 28. April 2014, 22:27:39 schrieb Lan Tianyu:

ACPI 5.0 spec(5.5.2.4.5) defines GenericSerialBus(i2c, spi, uart)
operation
region. It allows ACPI aml code able to access such kind of devices to
implement some ACPI standard method.

On the Asus T100TA, Bios use GenericSerialBus operation region to access
i2c device to get battery info. So battery function depends on the I2C
operation region support. Here is the bug link.
https://bugzilla.kernel.org/show_bug.cgi?id=69011


Hi all,



I have tested this series and got some errors, but no additional

functionality:

Hi Rolf:
Thanks for test. Could you attach the output of dmesg and acpidump?
Which machine you are testing on?


Hi,

this is an Aava Inari 8 tablet (pre-release hardware). Please find the DSDT
and the dmesg.log attached.

In case of any further questions don't hesitate to ask, I'll try to be more
responsible.



Hi Eike:
Could you apply the patch in the attachment and attach the output of
dmesg?




Regards,

Eike



diff --git a/drivers/acpi/bus.c b/drivers/acpi/bus.c
index 4ed8d48..cc8c132 100644
--- a/drivers/acpi/bus.c
+++ b/drivers/acpi/bus.c
@@ -139,8 +139,7 @@ int acpi_bus_attach_private_data(acpi_handle handle, void *data)
 	status = acpi_attach_data(handle,
 			acpi_bus_private_data_handler, data);
 	if (ACPI_FAILURE(status)) {
-		ACPI_ERROR((AE_INFO, "Error attaching device[%p] data\n",
-handle));
+		acpi_handle_err(handle, "Error attaching device data %d\n", status);
 		return -ENODEV;
 	}
 


Re: [Patch V2 0/9] I2C ACPI operation region handler support

2014-05-13 Thread Lan Tianyu

On 05/13/2014 09:09 PM, Rolf Eike Beer wrote:

Am Montag, 28. April 2014, 22:27:39 schrieb Lan Tianyu:

ACPI 5.0 spec(5.5.2.4.5) defines GenericSerialBus(i2c, spi, uart) operation
region. It allows ACPI aml code able to access such kind of devices to
implement some ACPI standard method.

On the Asus T100TA, Bios use GenericSerialBus operation region to access
i2c device to get battery info. So battery function depends on the I2C
operation region support. Here is the bug link.
https://bugzilla.kernel.org/show_bug.cgi?id=69011


Hi all,

I have tested this series and got some errors, but no additional functionality:



Hi Rolf:
Thanks for test. Could you attach the output of dmesg and acpidump?
Which machine you are testing on?


[0.607442] ACPI Error: Error attaching device[f60238a0] data
[0.607460]  (20140214/bus-143)
[0.607708] ACPI Error: Error attaching device[f60238a0] data
[0.607724]  (20140214/bus-143)
[0.607987] ACPI Error: Error attaching device[f60238a0] data
[0.608003]  (20140214/bus-143)
[0.608251] ACPI Error: Error attaching device[f60238a0] data
[0.608267]  (20140214/bus-143)
[0.608515] ACPI Error: Error attaching device[f60238a0] data
[0.608531]  (20140214/bus-143)

A bit more output, e.g. the error code if such is present or the device path,
could probably help when identifyint the device in question.

Also this still looks incomplete, as on other places one still gets those
warnings:

[0.314944] pnp 00:08: Plug and Play ACPI device, IDs INT33fc (active)
[0.316122] pnp 00:09: unknown resource type 19 in _CRS
[0.316136] pnp 00:09: can't evaluate _CRS: 1

I don't know if looking on them at this place has any value, maybe something
like this is correct?

commit 52e2822c4c8b09180e5eb3dd94e4e9aea0d25eff
Author: Rolf Eike Beer 
Date:   Tue Feb 18 11:11:10 2014 +0100

 ACPI: ignore GPIO and SERIAL_BUS resources in PNP init code

diff --git a/drivers/pnp/pnpacpi/rsparser.c b/drivers/pnp/pnpacpi/rsparser.c
index 167f3d0..5b8459b 100644
--- a/drivers/pnp/pnpacpi/rsparser.c
+++ b/drivers/pnp/pnpacpi/rsparser.c
@@ -240,6 +240,8 @@ static acpi_status pnpacpi_allocated_resource(struct 
acpi_resource *res,
 break;

 case ACPI_RESOURCE_TYPE_GENERIC_REGISTER:
+   case ACPI_RESOURCE_TYPE_GPIO:
+   case ACPI_RESOURCE_TYPE_SERIAL_BUS:
 break;

 default:

Greetings,

Eike



--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [Patch V2 0/9] I2C ACPI operation region handler support

2014-05-13 Thread Rolf Eike Beer
Am Montag, 28. April 2014, 22:27:39 schrieb Lan Tianyu:
> ACPI 5.0 spec(5.5.2.4.5) defines GenericSerialBus(i2c, spi, uart) operation
> region. It allows ACPI aml code able to access such kind of devices to
> implement some ACPI standard method.
> 
> On the Asus T100TA, Bios use GenericSerialBus operation region to access
> i2c device to get battery info. So battery function depends on the I2C
> operation region support. Here is the bug link.
> https://bugzilla.kernel.org/show_bug.cgi?id=69011

Hi all,

I have tested this series and got some errors, but no additional functionality:

[0.607442] ACPI Error: Error attaching device[f60238a0] data
[0.607460]  (20140214/bus-143)
[0.607708] ACPI Error: Error attaching device[f60238a0] data
[0.607724]  (20140214/bus-143)
[0.607987] ACPI Error: Error attaching device[f60238a0] data
[0.608003]  (20140214/bus-143)
[0.608251] ACPI Error: Error attaching device[f60238a0] data
[0.608267]  (20140214/bus-143)
[0.608515] ACPI Error: Error attaching device[f60238a0] data
[0.608531]  (20140214/bus-143)

A bit more output, e.g. the error code if such is present or the device path,
could probably help when identifyint the device in question.

Also this still looks incomplete, as on other places one still gets those
warnings:

[0.314944] pnp 00:08: Plug and Play ACPI device, IDs INT33fc (active)
[0.316122] pnp 00:09: unknown resource type 19 in _CRS
[0.316136] pnp 00:09: can't evaluate _CRS: 1

I don't know if looking on them at this place has any value, maybe something
like this is correct?

commit 52e2822c4c8b09180e5eb3dd94e4e9aea0d25eff
Author: Rolf Eike Beer 
Date:   Tue Feb 18 11:11:10 2014 +0100

ACPI: ignore GPIO and SERIAL_BUS resources in PNP init code

diff --git a/drivers/pnp/pnpacpi/rsparser.c b/drivers/pnp/pnpacpi/rsparser.c
index 167f3d0..5b8459b 100644
--- a/drivers/pnp/pnpacpi/rsparser.c
+++ b/drivers/pnp/pnpacpi/rsparser.c
@@ -240,6 +240,8 @@ static acpi_status pnpacpi_allocated_resource(struct 
acpi_resource *res,
break;
 
case ACPI_RESOURCE_TYPE_GENERIC_REGISTER:
+   case ACPI_RESOURCE_TYPE_GPIO:
+   case ACPI_RESOURCE_TYPE_SERIAL_BUS:
break;
 
default:

Greetings,

Eike
-- 
Rolf Eike Beer, emlix GmbH, http://www.emlix.com
Fon +49 551 30664-0, Fax +49 551 30664-11
Bertha-von-Suttner-Str. 9, 37085 Göttingen, Germany
Sitz der Gesellschaft: Göttingen, Amtsgericht Göttingen HR B 3160
Geschäftsführung: Dr. Uwe Kracke, Ust-IdNr.: DE 205 198 055

emlix - smart embedded open source


signature.asc
Description: This is a digitally signed message part.


Re: [Patch V2 0/9] I2C ACPI operation region handler support

2014-04-29 Thread Rafael J. Wysocki
On Tuesday, April 29, 2014 09:54:46 AM Lan Tianyu wrote:
> On 2014年04月29日 06:51, Rafael J. Wysocki wrote:
> > On Monday, April 28, 2014 10:27:39 PM Lan Tianyu wrote:
> >> ACPI 5.0 spec(5.5.2.4.5) defines GenericSerialBus(i2c, spi, uart) operation
> >> region. It allows ACPI aml code able to access such kind of devices to
> >> implement some ACPI standard method.
> >>
> >> On the Asus T100TA, Bios use GenericSerialBus operation region to access
> >> i2c device to get battery info. So battery function depends on the I2C
> >> operation region support. Here is the bug link.
> >> https://bugzilla.kernel.org/show_bug.cgi?id=69011
> >>
> >> This patchset is to add I2C ACPI operation region handler support.
> >>
> >> Change Since V1:
> >>Fix some code style and memory leak issues in Patch 7
> > 
> > Is it the only patch that has changed from v1?
> 
> 
> I also remove a redundant semicolon in the PATCH 8. Sorry. I didn't
> notice these patches are already in your tree. I will produce divergence
> patches based on your bleeding-edge branch.

No need for that, I'll use the new versions.

-- 
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [Patch V2 0/9] I2C ACPI operation region handler support

2014-04-28 Thread Lan Tianyu
On 2014年04月29日 06:51, Rafael J. Wysocki wrote:
> On Monday, April 28, 2014 10:27:39 PM Lan Tianyu wrote:
>> ACPI 5.0 spec(5.5.2.4.5) defines GenericSerialBus(i2c, spi, uart) operation
>> region. It allows ACPI aml code able to access such kind of devices to
>> implement some ACPI standard method.
>>
>> On the Asus T100TA, Bios use GenericSerialBus operation region to access
>> i2c device to get battery info. So battery function depends on the I2C
>> operation region support. Here is the bug link.
>> https://bugzilla.kernel.org/show_bug.cgi?id=69011
>>
>> This patchset is to add I2C ACPI operation region handler support.
>>
>> Change Since V1:
>>Fix some code style and memory leak issues in Patch 7
> 
> Is it the only patch that has changed from v1?


I also remove a redundant semicolon in the PATCH 8. Sorry. I didn't
notice these patches are already in your tree. I will produce divergence
patches based on your bleeding-edge branch.


> 
> Rafael
> 


-- 
Best regards
Tianyu Lan
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [Patch V2 0/9] I2C ACPI operation region handler support

2014-04-28 Thread Rafael J. Wysocki
On Monday, April 28, 2014 10:27:39 PM Lan Tianyu wrote:
> ACPI 5.0 spec(5.5.2.4.5) defines GenericSerialBus(i2c, spi, uart) operation
> region. It allows ACPI aml code able to access such kind of devices to
> implement some ACPI standard method.
> 
> On the Asus T100TA, Bios use GenericSerialBus operation region to access
> i2c device to get battery info. So battery function depends on the I2C
> operation region support. Here is the bug link.
> https://bugzilla.kernel.org/show_bug.cgi?id=69011
> 
> This patchset is to add I2C ACPI operation region handler support.
> 
> Change Since V1:
>Fix some code style and memory leak issues in Patch 7

Is it the only patch that has changed from v1?

Rafael

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/