Re: [PATCH] itg3200: add dt support.

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

 



On Mon, 18 Nov 2013 11:57:42 +0000 Mark Rutland <mark.rutland@xxxxxxx> wrote:

> On Fri, Nov 01, 2013 at 04:48:54AM +0000, NeilBrown wrote:
> > 
> > 
> > No new configuration, just a 'compatible' string and documentation.
> > 
> > Signed-off-by: NeilBrown <neilb@xxxxxxx>
> > 
> > diff --git a/Documentation/devicetree/bindings/iio/gyro/itg3200.txt b/Documentation/devicetree/bindings/iio/gyro/itg3200.txt
> > new file mode 100644
> > index 000000000000..4581620632df
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/iio/gyro/itg3200.txt
> > @@ -0,0 +1,20 @@
> > +* InvenSense ITG3200 3-axis gyroscope
> > +
> > +Required properties:
> > +
> > +  - compatible : "invensense,itg3200"
> > +  - reg : I2C address, typically 0x68
> > +
> > +Optional properties:
> > +
> > +  - interrupt-parent : should be the phandle for the interrupt controller
> > +  - interrupts : interrupt mapping for GPIO IRQ
> 
> Why is this a "GPIO IRQ"? This device das no GPIO. The fact that it
> might be wired to a GPIO controller has nothing to do with the ITG3200,
> and shouldn't be a concern of its binding.
> 

You are of course correct.  I'll resubmit with that word removed.

I probably copied it from bma180.txt without thinking.

/home/git/linux$ git grep 'GPIO IRQ' Documentation/devicetree/bindings/
Documentation/devicetree/bindings/gpio/8xxx_gpio.txt: - interrupts : Interrupt mapping for GPIO IRQ.
Documentation/devicetree/bindings/gpio/gpio-xilinx.txt:- interrupts : Interrupt mapping for GPIO IRQ.
Documentation/devicetree/bindings/gpio/pl061-gpio.txt:- interrupts : Interrupt mapping for GPIO IRQ.
Documentation/devicetree/bindings/iio/accel/bma180.txt:  - interrupts : interrupt mapping for GPIO IRQ, it should by configured wi
Documentation/devicetree/bindings/iio/light/apds9300.txt:  - interrupts : interrupt mapping for GPIO IRQ

Both bma180.txt and apds9300.txt seem to use the phrase "GPIO IRQ"
inappropriately.

Thanks,
NeilBrown

> Thanks,
> Mark.
> 
> > +
> > +Example:
> > +
> > +itg3200@68 {
> > +	compatible = "invensense,itg3200";
> > +	reg = <0x68>;
> > +	interrupt-parent = <&gpio2>;
> > +	interrupts = <24 IRQ_TYPE_EDGE_RISING>;
> > +};
> > diff --git a/drivers/iio/gyro/itg3200_core.c b/drivers/iio/gyro/itg3200_core.c
> > index 4d3f3b92b361..1ed3003ef41a 100644
> > --- a/drivers/iio/gyro/itg3200_core.c
> > +++ b/drivers/iio/gyro/itg3200_core.c
> > @@ -374,10 +374,17 @@ static const struct i2c_device_id itg3200_id[] = {
> >  };
> >  MODULE_DEVICE_TABLE(i2c, itg3200_id);
> >  
> > +static const struct of_device_id itg3200_of_match[] = {
> > +	{ .compatible = "invensense,itg3200", },
> > +	{}
> > +};
> > +MODULE_DEVICE_TABLE(of, itg3200_of_match);
> > +
> >  static struct i2c_driver itg3200_driver = {
> >  	.driver = {
> >  		.owner  = THIS_MODULE,
> >  		.name	= "itg3200",
> > +		.of_match_table = of_match_ptr(itg3200_of_match),
> >  	},
> >  	.id_table	= itg3200_id,
> >  	.probe		= itg3200_probe,
> 

Attachment: signature.asc
Description: PGP signature


[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