Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit aa256f8d authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman
Browse files

Merge tag 'iio-for-3.15b' of...

Merge tag 'iio-for-3.15b' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-next

Jonathan writes:

Second round of IIO new driver, functionality and cleanups for the 3.15 series.

There are a few fixes in here that might, earlier in a cycle, have gone
to Greg as fixes. Given they are either minor or have never actually
been observed as causing trouble (the locking bug in the event code) and
are invasive, I have included them in this pull request, targeting the
3.15 merge window instead.

The rest are pretty uncontroversial new drivers, a handy little tool for
the example code in our documentation and little cleanups.

New drivers
* Freescale Vybrid and i.MX6SLX ADC driver.
* HID Sensor hub proximity sensors.
* HID Sensor hub pressure sensors.
* LPS25H Pressure sensors added to the ST micro pressure sensor driver.

New functionality
* lsiio tool.  This is added to the staging tree as we haven't yet moved
  the example code it sits with out.  Moving this code out is now a reasonably
  high priority but holding up this tool in the meantime did not seem
  worthwhile.
* mag3110 - add missing scale factor for temperature output to userspace.

Cleanups
* Fix a bug in the event reporting in which a spin lock might be held over
  when a sleep occured.  A similar bug was found by Lars in the buffer code.
  It has not to our knowledge been observed as actually occuring and is
  a little too invasive to push out as a fix.
* Drop the IIO_ST macro after clearing out all users.  This macro was a very
  bad idea leading to a number of bugs after it stopped covering all elements
  of the structure being assigned and people started making assumptions about
  what it did cover.  Glad to see it go!
* Avoid applying extended name to shared attributes as it makes no sense.
  No in tree drivers were using the combination, hence not pushed out as
  a fix.
* ad799x - move to devm_request_threaded_irq to reduce boilerplate clean up.
* bma180 - make the low_pass_filter_3db_frequency info element shared rather
  than per attribute.  The old approach was valid but not as clean as it might
  be and was setting a bad example.  Hence the cleanup.
* mxs-lradc - propogate the error code form a platform_get_irq call rather than
  eating it up by returning -EINVAL on all errors.
* ad799x - typo fix in the copyright message. Either that or Michael was
  asserting a copyright that moved backwards in time by about a thousand years.
* ad799x - use a regulator for vref rather than platform data.  The driver
  dates from just as the regulator framework was coming into common use so
  provides an alternative way of specifying the reference voltage.  We no
  longer need that approach so drop it in favour of a regulator only approach.
* max1363 - some internal vref values were out by a small amount.  The effect
  would have been tiny and no one noticed hence not pushing this through as
  a fix.
* core - replace some pointless goto error_ret (with no clean up) lines with
  direct returns.  This is my bad coding style so I'm glad to see it cleaned
  up.
* core - avoid a kasprintf that just directly prints a string with no
  formatting elements.  This has always been there but Lars just noticed it.
  Oops.
parents c36d44ac b91accaf
Loading
Loading
Loading
Loading
+22 −0
Original line number Diff line number Diff line
Freescale vf610 Analog to Digital Converter bindings

The devicetree bindings are for the new ADC driver written for
vf610/i.MX6slx and upward SoCs from Freescale.

Required properties:
- compatible: Should contain "fsl,vf610-adc"
- reg: Offset and length of the register set for the device
- interrupts: Should contain the interrupt for the device
- clocks: The clock is needed by the ADC controller, ADC clock source is ipg clock.
- clock-names: Must contain "adc", matching entry in the clocks property.
- vref-supply: The regulator supply ADC refrence voltage.

Example:
adc0: adc@4003b000 {
	compatible = "fsl,vf610-adc";
	reg = <0x4003b000 0x1000>;
	interrupts = <0 53 0x04>;
	clocks = <&clks VF610_CLK_ADC0>;
	clock-names = "adc";
	vref-supply = <&reg_vcc_3v3_mcu>;
};
+2 −2
Original line number Diff line number Diff line
@@ -451,9 +451,9 @@ static const struct iio_chan_spec_ext_info bma180_ext_info[] = {
	.type = IIO_ACCEL,						\
	.modified = 1,							\
	.channel2 = IIO_MOD_##_axis,					\
	.info_mask_separate = BIT(IIO_CHAN_INFO_RAW) |			\
	.info_mask_separate = BIT(IIO_CHAN_INFO_RAW),			\
	.info_mask_shared_by_type = BIT(IIO_CHAN_INFO_SCALE) |		\
		BIT(IIO_CHAN_INFO_LOW_PASS_FILTER_3DB_FREQUENCY),	\
	.info_mask_shared_by_type = BIT(IIO_CHAN_INFO_SCALE),		\
	.scan_index = AXIS_##_axis,					\
	.scan_type = {							\
		.sign = 's',						\
+10 −0
Original line number Diff line number Diff line
@@ -197,6 +197,16 @@ config TWL6030_GPADC
	  This driver can also be built as a module. If so, the module will be
	  called twl6030-gpadc.

config VF610_ADC
	tristate "Freescale vf610 ADC driver"
	depends on OF
	help
	  Say yes here to support for Vybrid board analog-to-digital converter.
	  Since the IP is used for i.MX6SLX, the driver also support i.MX6SLX.

	  This driver can also be built as a module. If so, the module will be
	  called vf610_adc.

config VIPERBOARD_ADC
	tristate "Viperboard ADC support"
	depends on MFD_VIPERBOARD && USB
+1 −0
Original line number Diff line number Diff line
@@ -21,4 +21,5 @@ obj-$(CONFIG_NAU7802) += nau7802.o
obj-$(CONFIG_TI_ADC081C) += ti-adc081c.o
obj-$(CONFIG_TI_AM335X_ADC) += ti_am335x_adc.o
obj-$(CONFIG_TWL6030_GPADC) += twl6030-gpadc.o
obj-$(CONFIG_VF610_ADC) += vf610_adc.o
obj-$(CONFIG_VIPERBOARD_ADC) += viperboard_adc.o
+3 −3
Original line number Diff line number Diff line
@@ -1247,7 +1247,7 @@ static const struct max1363_chip_info max1363_chip_info_tbl[] = {
	},
	[max11604] = {
		.bits = 8,
		.int_vref_mv = 4098,
		.int_vref_mv = 4096,
		.mode_list = max1238_mode_list,
		.num_modes = ARRAY_SIZE(max1238_mode_list),
		.default_mode = s0to11,
@@ -1307,7 +1307,7 @@ static const struct max1363_chip_info max1363_chip_info_tbl[] = {
	},
	[max11610] = {
		.bits = 10,
		.int_vref_mv = 4098,
		.int_vref_mv = 4096,
		.mode_list = max1238_mode_list,
		.num_modes = ARRAY_SIZE(max1238_mode_list),
		.default_mode = s0to11,
@@ -1367,7 +1367,7 @@ static const struct max1363_chip_info max1363_chip_info_tbl[] = {
	},
	[max11616] = {
		.bits = 12,
		.int_vref_mv = 4098,
		.int_vref_mv = 4096,
		.mode_list = max1238_mode_list,
		.num_modes = ARRAY_SIZE(max1238_mode_list),
		.default_mode = s0to11,
Loading