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: <529096F6.3040202@kernel.org>
Date:	Sat, 23 Nov 2013 11:52:22 +0000
From:	Jonathan Cameron <jic23@...nel.org>
To:	Sebastian Reichel <sre@...ian.org>,
	Sebastian Reichel <sre@...g0.de>, linux-iio@...r.kernel.org
CC:	Rob Herring <rob.herring@...xeda.com>,
	Pawel Moll <pawel.moll@....com>,
	Mark Rutland <mark.rutland@....com>,
	Stephen Warren <swarren@...dotorg.org>,
	Ian Campbell <ijc+devicetree@...lion.org.uk>,
	Rob Landley <rob@...dley.net>,
	Jonathan Cameron <jic23@....ac.uk>,
	Kumar Gala <galak@...eaurora.org>,
	Peter Meerwald <pmeerw@...erw.net>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	Bill Pemberton <wfp5p@...ginia.edu>,
	Sachin Kamat <sachin.kamat@...aro.org>,
	devicetree@...r.kernel.org, linux-doc@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCHv3] iio:light:tsl2563: Add DT support

On 10/25/13 10:10, Sebastian Reichel wrote:
> Add Device Tree support for the TSL2563 driver,
> document the binding and add AMS-TAOS Inc. to the
> list of vendor prefixes.
> 
> Signed-off-by: Sebastian Reichel <sre@...ian.org>
> Acked-by: Kumar Gala <galak@...eaurora.org>
Applied to the togreg branch of iio.git with the minor change Grant pointed out
to not use the indexed version of the of_property_read_u32

Thanks all,

Jonathan
> ---
>  .../devicetree/bindings/iio/light/tsl2563.txt         | 19 +++++++++++++++++++
>  Documentation/devicetree/bindings/vendor-prefixes.txt |  1 +
>  drivers/iio/light/tsl2563.c                           |  4 ++++
>  3 files changed, 24 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/iio/light/tsl2563.txt
> 
> diff --git a/Documentation/devicetree/bindings/iio/light/tsl2563.txt b/Documentation/devicetree/bindings/iio/light/tsl2563.txt
> new file mode 100644
> index 0000000..f91e809
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/iio/light/tsl2563.txt
> @@ -0,0 +1,19 @@
> +* AMS TAOS TSL2563 ambient light sensor
> +
> +Required properties:
> +
> +  - compatible : should be "amstaos,tsl2563"
> +  - reg : the I2C address of the sensor
> +
> +Optional properties:
> +
> +  - amstaos,cover-comp-gain : integer used as multiplier for gain
> +                              compensation (default = 1)
> +
> +Example:
> +
> +tsl2563@29 {
> +	compatible = "amstaos,tsl2563";
> +	reg = <0x29>;
> +	amstaos,cover-comp-gain = <16>;
> +};
> diff --git a/Documentation/devicetree/bindings/vendor-prefixes.txt b/Documentation/devicetree/bindings/vendor-prefixes.txt
> index 2cc3dad..8cf3edf 100644
> --- a/Documentation/devicetree/bindings/vendor-prefixes.txt
> +++ b/Documentation/devicetree/bindings/vendor-prefixes.txt
> @@ -9,6 +9,7 @@ aeroflexgaisler	Aeroflex Gaisler AB
>  ak	Asahi Kasei Corp.
>  altr	Altera Corp.
>  amcc	Applied Micro Circuits Corporation (APM, formally AMCC)
> +amstaos	AMS-Taos Inc.
>  apm	Applied Micro Circuits Corporation (APM)
>  arm	ARM Ltd.
>  atmel	Atmel Corporation
> diff --git a/drivers/iio/light/tsl2563.c b/drivers/iio/light/tsl2563.c
> index ebb962c..261660a 100644
> --- a/drivers/iio/light/tsl2563.c
> +++ b/drivers/iio/light/tsl2563.c
> @@ -699,6 +699,7 @@ static int tsl2563_probe(struct i2c_client *client,
>  	struct iio_dev *indio_dev;
>  	struct tsl2563_chip *chip;
>  	struct tsl2563_platform_data *pdata = client->dev.platform_data;
> +	struct device_node *np = client->dev.of_node;
>  	int err = 0;
>  	u8 id = 0;
>  
> @@ -735,6 +736,9 @@ static int tsl2563_probe(struct i2c_client *client,
>  
>  	if (pdata)
>  		chip->cover_comp_gain = pdata->cover_comp_gain;
> +	else if (np)
> +		of_property_read_u32_index(np, "amstaos,cover-comp-gain", 0,
> +							&chip->cover_comp_gain);
>  	else
>  		chip->cover_comp_gain = 1;
>  
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ