Re: [PATCH 4/4] staging: iio: ad5933: Add of_device_id table

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

 



On Tue, 2 Oct 2018 14:58:00 +0300
Alexandru Ardelean <alexandru.ardelean@xxxxxxxxxx> wrote:

> From: Dragos Bogdan <dragos.bogdan@xxxxxxxxxx>
> 
> As part of finalizing the device-tree support for this driver, this patch
> adds the of_device_id table with supported devices.
> 
> Signed-off-by: Dragos Bogdan <dragos.bogdan@xxxxxxxxxx>
> Signed-off-by: Alexandru Ardelean <alexandru.ardelean@xxxxxxxxxx>
> ---
>  drivers/staging/iio/impedance-analyzer/ad5933.c | 8 ++++++++
>  1 file changed, 8 insertions(+)
> 
> diff --git a/drivers/staging/iio/impedance-analyzer/ad5933.c b/drivers/staging/iio/impedance-analyzer/ad5933.c
> index 04208a1df48e..ab8b93fd39ed 100644
> --- a/drivers/staging/iio/impedance-analyzer/ad5933.c
> +++ b/drivers/staging/iio/impedance-analyzer/ad5933.c
> @@ -809,6 +809,14 @@ static int ad5933_remove(struct i2c_client *client)
>  	return 0;
>  }
>  
> +static const struct of_device_id of_ad5933_match[] = {
> +	{ .compatible = "adi,ad5933", 0},
> +	{ .compatible = "adi,ad5934", 0},
> +	{},
> +};
I would expect this to also be assigned to the driver of_match_table.

I know it'll pick it up via the device_id if not, but it's not how
it is ultimately intended to work.

Jonathan
> +
> +MODULE_DEVICE_TABLE(of, of_ad5933_match);
> +
>  static const struct i2c_device_id ad5933_id[] = {
>  	{ "ad5933", 0 },
>  	{ "ad5934", 0 },




[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