lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <b67c7147-e35c-2408-8324-c688af4e82b7@metafoo.de>
Date:   Wed, 18 Mar 2020 18:33:58 +0100
From:   Lars-Peter Clausen <lars@...afoo.de>
To:     Michael Auchter <michael.auchter@...com>,
        Michael Hennerich <Michael.Hennerich@...log.com>,
        Jonathan Cameron <jic23@...nel.org>,
        Hartmut Knaack <knaack.h@....de>,
        Peter Meerwald-Stadler <pmeerw@...erw.net>
Cc:     linux-pm@...r.kernel.org, linux-iio@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/3] iio: dac: ad5686: add of_match_table

On 3/18/20 4:34 PM, Michael Auchter wrote:
> Add of_match_table to this driver, so devices can be probed based on
> device tree contents.
> 
> Signed-off-by: Michael Auchter <michael.auchter@...com>
> ---
>   drivers/iio/dac/ad5696-i2c.c | 19 +++++++++++++++++++
>   1 file changed, 19 insertions(+)
> 
> diff --git a/drivers/iio/dac/ad5696-i2c.c b/drivers/iio/dac/ad5696-i2c.c
> index f100a5fe4219..26818bccffa2 100644
> --- a/drivers/iio/dac/ad5696-i2c.c
> +++ b/drivers/iio/dac/ad5696-i2c.c
> @@ -88,9 +88,28 @@ static const struct i2c_device_id ad5686_i2c_id[] = {
>   };
>   MODULE_DEVICE_TABLE(i2c, ad5686_i2c_id);
>   
> +static const struct of_device_id ad5686_of_match[] = {
> +	{ .compatible = "adi,ad5311r" },
> +	{ .compatible = "adi,ad5671r" },
> +	{ .compatible = "adi,ad5675r" },
> +	{ .compatible = "adi,ad5691r" },
> +	{ .compatible = "adi,ad5692r" },
> +	{ .compatible = "adi,ad5693" },
> +	{ .compatible = "adi,ad5693r" },
> +	{ .compatible = "adi,ad5694" },
> +	{ .compatible = "adi,ad5694r" },
> +	{ .compatible = "adi,ad5695r" },
> +	{ .compatible = "adi,ad5696" },
> +	{ .compatible = "adi,ad5696r" },
> +	{ .compatible = "adi,ad5338r" },

Same here, table should be ordered.

> +	{}
> +};
> +MODULE_DEVICE_TABLE(of, ad5686_of_match);
> +
>   static struct i2c_driver ad5686_i2c_driver = {
>   	.driver = {
>   		.name = "ad5696",
> +		.of_match_table = of_match_ptr(ad5686_of_match),
>   	},
>   	.probe = ad5686_i2c_probe,
>   	.remove = ad5686_i2c_remove,
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ