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: <20190324180503.6dc1e36e@archlinux>
Date:   Sun, 24 Mar 2019 18:05:03 +0000
From:   Jonathan Cameron <jic23@...nel.org>
To:     "H. Nikolaus Schaller" <hns@...delico.com>
Cc:     Rob Herring <robh+dt@...nel.org>,
        Mark Rutland <mark.rutland@....com>,
        Hartmut Knaack <knaack.h@....de>,
        Lars-Peter Clausen <lars@...afoo.de>,
        Peter Meerwald-Stadler <pmeerw@...erw.net>,
        linux-iio@...r.kernel.org, devicetree@...r.kernel.org,
        linux-kernel@...r.kernel.org, letux-kernel@...nphoenux.org,
        kernel@...a-handheld.com
Subject: Re: [PATCH 1/2] iio: gyro: bmg160: add device tree compatibility
 table

On Mon, 18 Mar 2019 16:14:14 +0100
"H. Nikolaus Schaller" <hns@...delico.com> wrote:

> Add of_match_table.
> 
> Signed-off-by: H. Nikolaus Schaller <hns@...delico.com>
I'm not against doing this, but do note that there is still a back up
path in which the i2c_device_id table is used to match but without
the vendor part of the string.

I theory the plan is to eventually remove that, but it's not the
case that this driver could not be probed from devicetree previously.

Applied to the togreg branch of iio.git and pushed out as testing
for the autobuilders to play with it.

Thanks,

Jonathan

> ---
>  drivers/iio/gyro/bmg160_i2c.c | 9 +++++++++
>  1 file changed, 9 insertions(+)
> 
> diff --git a/drivers/iio/gyro/bmg160_i2c.c b/drivers/iio/gyro/bmg160_i2c.c
> index 90126a5a7663..934a092134f0 100644
> --- a/drivers/iio/gyro/bmg160_i2c.c
> +++ b/drivers/iio/gyro/bmg160_i2c.c
> @@ -54,10 +54,19 @@ static const struct i2c_device_id bmg160_i2c_id[] = {
>  
>  MODULE_DEVICE_TABLE(i2c, bmg160_i2c_id);
>  
> +static const struct of_device_id bmg160_of_match[] = {
> +	{ .compatible = "bosch,bmg160" },
> +	{ .compatible = "bosch,bmi055_gyro" },
> +	{ }
> +};
> +
> +MODULE_DEVICE_TABLE(of, bmg160_of_match);
> +
>  static struct i2c_driver bmg160_i2c_driver = {
>  	.driver = {
>  		.name	= "bmg160_i2c",
>  		.acpi_match_table = ACPI_PTR(bmg160_acpi_match),
> +		.of_match_table = bmg160_of_match,
>  		.pm	= &bmg160_pm_ops,
>  	},
>  	.probe		= bmg160_i2c_probe,

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ