Re: [PATCH v2 2/2] iio: imu: bmi323: Add and enable ACPI Match Table

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 13 Feb 2024 14:39:10 -0800
Jonathan LoBue <jlobue10@xxxxxxxxx> wrote:

> This patch adds the ACPI match table for ASUS ROG ALLY to load the bmi323
> driver with an ACPI match of "BOSC0200".
> 
> Co-developed-by: Jonathan LoBue <jlobue10@xxxxxxxxx>

Take another look at how to use Co-developed in submitting-patches.rst
there are examples - key is that the author (From: in the email)
does not have a Co-developed-by line.

> Signed-off-by: Jonathan LoBue <jlobue10@xxxxxxxxx>
> Co-developed-by: Luke D. Jones <luke@xxxxxxxxxx>
> Signed-off-by: Luke D. Jones <luke@xxxxxxxxxx>
> Co-developed-by: Denis Benato <benato.denis96@xxxxxxxxx>
> Signed-off-by: Denis Benato <benato.denis96@xxxxxxxxx>
> Co-developed-by: Antheas Kapenekakis <lkml@xxxxxxxxxxx>
> Signed-off-by: Antheas Kapenekakis <lkml@xxxxxxxxxxx>
> ---
> 
> Formatting fixes, removed duplicate header, and removed ACPI_PTR
> from previous submission.
> 
> Added an explanation of the duplicate ACPI identifier issue between
> devices using bmc150 and bmi323.
> 
>  drivers/iio/imu/bmi323/bmi323_i2c.c | 20 ++++++++++++++++++++
>  1 file changed, 20 insertions(+)
> 
> diff --git a/drivers/iio/imu/bmi323/bmi323_i2c.c b/drivers/iio/imu/bmi323/bmi323_i2c.c
> index 20a8001b9956..22826a2efc6f 100644
> --- a/drivers/iio/imu/bmi323/bmi323_i2c.c
> +++ b/drivers/iio/imu/bmi323/bmi323_i2c.c
> @@ -93,6 +93,25 @@ static int bmi323_i2c_probe(struct i2c_client *i2c)
>  	return bmi323_core_probe(dev);
>  }
>  
> +/*
> + * The "BOSC0200" ACPI identifier used here in the bmi323 driver is not
> + * unique to bmi323 devices. The same "BOSC0200" identifier is found in
> + * devices using the bmc150 chip. This creates a conflict with duplicate
> + * ACPI identifiers which multiple drivers want to use. If a non-bmi323
> + * device starts to load with this "BOSC0200" ACPI match here, then the
> + * chip id check portion should fail and the driver should relinquish the
> + * device. If and when a different driver (such as bmc150) starts to load
> + * with the "BOSC0200" ACPI match, a short reset should ensure that the
> + * device is not in a bad state during that driver initialization. This
> + * device reset does occur in both the bmi323 and bmc150 init sequences.
> + */
> +
> +static const struct acpi_device_id bmi323_acpi_match[] = {
> +	{ "BOSC0200" },
> +	{ }
> +};
> +MODULE_DEVICE_TABLE(acpi, bmi323_acpi_match);
> +
>  static const struct i2c_device_id bmi323_i2c_ids[] = {
>  	{ "bmi323" },
>  	{ }
> @@ -109,6 +128,7 @@ static struct i2c_driver bmi323_i2c_driver = {
>  	.driver = {
>  		.name = "bmi323",
>  		.of_match_table = bmi323_of_i2c_match,
> +		.acpi_match_table = bmi323_acpi_match,
>  	},
>  	.probe = bmi323_i2c_probe,
>  	.id_table = bmi323_i2c_ids,





[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux