Age | Commit message (Collapse) | Author |
|
When COMEDI_NI_LABPC is built-in and COMEDI_NI_LABPC_ISA is a loadable
module, thhe ISA DMA code is not reachable by the common module, causing
a link error:
drivers/staging/built-in.o: In function `labpc_interrupt':
ni_labpc_common.c:(.text+0x1d178): undefined reference to `labpc_handle_dma_status'
ni_labpc_common.c:(.text+0x1d1cb): undefined reference to `labpc_drain_dma'
drivers/staging/built-in.o: In function `labpc_ai_cmd':
ni_labpc_common.c:(.text+0x1d8ad): undefined reference to `labpc_setup_dma'
This changes the definition of COMEDI_NI_LABPC_ISADMA so that it will
also be builtin for that case. This looks like a rather old bug, but
I have never seen this in randconfig testing until today.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
The rtl8723bs is found on quite a few systems used by Linux users,
such as on Atom systems (Intel Computestick and various other
Atom based devices) and on many (budget) ARM boards such as
the CHIP.
The plan moving forward with this is for the new clean,
written from scratch, rtl8xxxu driver to eventually gain
support for sdio devices. But there is no clear timeline
for that, so lets add this driver included in staging for now.
Cc: Bastien Nocera <hadess@hadess.net>
Cc: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Jes Sorensen <jes.sorensen@gmail.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
Wrap arguments of call to vnt_control_out() to avoid exceeding 80
character limit, but maintain alignment.
Signed-off-by: Daniel Cashman <dan.a.cashman@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
Change embedded function name in vnt_rf_set_txpower with %s format with
__func__ argument to make it consistent with other part of if-else and
kernel coding style standards as reported by checkpatch.
Signed-off-by: Daniel Cashman <dan.a.cashman@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
Address checkpatch errors encountered in rf.c by removing use of spaces
and replacing with properly aligned tabs.
Signed-off-by: Daniel Cashman <dan.a.cashman@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
Kernel day0 testing robot reported a kernel BUG at drivers/base/driver.c!
with the following call stack:
[ 14.963563] ------------[ cut here ]------------
[ 14.967298] kernel BUG at drivers/base/driver.c:153!
[ 14.970948] invalid opcode: 0000 [#1] SMP
[ 14.974013] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.11.0-rc4-00790-g0789e2c #1
[ 14.978221] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.9.3-20161025_171302-gandalf 04/01/2014
[ 14.983417] task: ffff88001ea46040 task.stack: ffffc90000008000
[ 14.987315] RIP: 0010:driver_register+0xa1/0xd0
[ 14.990044] RSP: 0000:ffffc9000000be60 EFLAGS: 00010246
[ 14.993039] RAX: 0000000000000000 RBX: ffffffff831d4c20 RCX: 0000000000000000
[ 14.997040] RDX: 000000000000004d RSI: ffffffff831d47c0 RDI: ffffffff831d4c20
[ 15.001511] RBP: ffffc9000000be78 R08: ffffc9000000be78 R09: ffffc9000000be7c
[ 15.006163] R10: 0000000000000000 R11: 0000000000000001 R12: 0000000000000000
[ 15.010068] R13: 00000000ffffffff R14: ffffffff832f3923 R15: 0000000000000000
[ 15.013715] FS: 0000000000000000(0000) GS:ffff88001fa00000(0000) knlGS:0000000000000000
[ 15.017460] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[ 15.021268] CR2: 0000000000000000 CR3: 0000000003009000 CR4: 00000000000006b0
[ 15.025633] Call Trace:
[ 15.028069] ? visorbus_register_visor_driver+0x3f/0x60
[ 15.031065] ? init_unisys+0x3a/0x90
[ 15.033562] ? device_resume_response+0x50/0x50
[ 15.036083] visorinput_init+0x10/0x20
[ 15.038937] do_one_initcall+0x9a/0x164
[ 15.041838] ? set_debug_rodata+0x12/0x12
[ 15.045333] kernel_init_freeable+0x11e/0x1a1
[ 15.048369] ? rest_init+0x80/0x80
[ 15.050813] kernel_init+0x9/0x100
[ 15.053353] ret_from_fork+0x2c/0x40
[ 15.056009] Code: ff 85 c0 41 89 c4 75 13 48 8b 7b 70 31 f6 e8 97 16 be ff 44 89 e0 5b 41 5c 5d c3 48 89 df e8 57 e1 ff ff 44 89 e0 5b 41 5c 5d c3 <0f> 0b 48 8b 33 48 c7 c7 a0 dd d5 82 e8 ec f0 6f ff 48 8b 73 08
[ 15.065144] RIP: driver_register+0xa1/0xd0 RSP: ffffc9000000be60
[ 15.068360] ---[ end trace 7d13369c38d80a8f ]---
This bug will occur if the visorbus driver is built-in to the kernel, and
the resulting kernel is run in an environment where visorbus devices are
NOT supported, and an attempt is made to load any of the drivers: visorhba,
visornic, or visorinput.
Checked to see if we have called bus_register, if not do not call
driver_register.
Signed-off-by: David Kershner <david.kershner@unisys.com>
Fixes: 5b6f9b95f7ae ("staging: unisys: visorbus: get rid of create_bus_type.")
Reviewed-by: Tim Sell <timothy.sell@unisys.com>
Reviewed-by: David Binder <david.binder@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
Replace symbolic permissions S_IRUSR and S_IWUSR for their octal
counterparts
Signed-off-by: Thomas Jespersen <laumann.thomas@gmail.com>
Acked-by: David Kershner <david.kershner@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
$ make includecheck
./drivers/staging/lustre/lustre/ptlrpc/layout.c: ../include/lustre_debug.h is included more than once.
Signed-off-by: Darryl T. Agostinelli <dagostinelli@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
declarations
Adding a blank line after declaration
Signed-off-by: Pushkar Jambhlekar <pushkar.iit@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
Inside the function store_value() the table of writable registers need to
be passed to function get_static_reg_addr() or else the correct register
address is never going to be found.
Reported-by: Alex Riesen <alexander.riesen@cetitec.com>
Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
Despite the user payload may not be bigger than (2**16 - 1) bytes, the
final packet size may be bigger because of the gap space needed for the
controller.
This patch removes the temporary variables of the type u16 that are used
to hold the offsets that may be bigger than 2**16 bytes.
Signed-off-by: Andrey Shvetsov <andrey.shvetsov@k2l.de>
Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
The final size of the buffer used for the streaming transfer consists of
the size for the user payload (buffer_size) and the size for the gaps
needed by the controller (extra_len).
The current implementation of the hdm_configure_channel() corrects the
buffer size down to the next appropriate for the hardware value, that is
the whole number of frames, but uses the old unaligned value to
calculate the extra_len.
Current patch fixes the described problem.
Signed-off-by: Andrey Shvetsov <andrey.shvetsov@k2l.de>
Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
When a channel is being removed while an application holds the
corresponding character device, this device is going to be destroyed only
after the application closes the file descriptor and releases character
device. In case the channel appears again before the application closes the
file descriptor it holds, the channel cannot be linked.
This patch changes the described behavior and destroys the character
device at the time the channel get disconnected from the AIM.
Signed-off-by: Andrey Shvetsov <andrey.shvetsov@k2l.de>
Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
This patch replaces three temporary variables representing the
attributes to control the links between the AIMs and HDMs with an array
of three elements to keep the corresponding code compact.
Signed-off-by: Andrey Shvetsov <andrey.shvetsov@k2l.de>
Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
Currently an AIM has the following properties available to manage links:
- write-only "remove_link" used to remove a link from a list
- read/write "add_link" used to add a link to a list and display them
This patch transfers the read functionality of "add_link" to the new
read-only property "links" to build consistent set of properties to control
the list of links.
Signed-off-by: Andrey Shvetsov <andrey.shvetsov@k2l.de>
Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
This patch replaces 13 temporary variables representing the attributes
to control the channel with an array of 13 elements to keep the
corresponding code compact.
Signed-off-by: Andrey Shvetsov <andrey.shvetsov@k2l.de>
Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
This patch replaces the proprietary macros with those provided by the
kernel.
Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
This patch fixes the names of the show/store functions to match the naming
convention.
Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
This patch replaces the name store_remove_link by the remove_link_store
in the comment for the corresponding function.
Signed-off-by: Andrey Shvetsov <andrey.shvetsov@k2l.de>
Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
This patch replaces the name store_add_link by the add_link_store in the
comment for the corresponding function.
Signed-off-by: Andrey Shvetsov <andrey.shvetsov@k2l.de>
Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
Device specific platform support has been haphazard for Ion. There have
been several independent attempts and there are still objections to
what bindings exist right now. Just remove everything for a fresh start.
Signed-off-by: Laura Abbott <labbott@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
ION_IOC_MAP is the same as ION_IOC_SHARE. We really don't need two
identical interfaces. Remove it.
Signed-off-by: Laura Abbott <labbott@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
With the expansion of dma-buf and the move for Ion to be come just an
allocator, the import mechanism is mostly useless. There isn't a kernel
component to Ion anymore and handles are private to Ion. Remove this
interface.
Signed-off-by: Laura Abbott <labbott@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
Ion is now moving towards a unified interfact. This makes the custom
ioctl interface unneeded. Remove it.
Signed-off-by: Laura Abbott <labbott@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
Now that we call dma_map in the dma_buf API callbacks there is no need
to use the existing cache APIs. Remove the sync ioctl and the existing
bad dma_sync calls. Explicit caching can be handled with the dma_buf
sync API.
Signed-off-by: Laura Abbott <labbott@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
The new method of syncing with dma_map means that the page faulting sync
implementation is no longer applicable. Remove it.
Signed-off-by: Laura Abbott <labbott@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
Technically, calling dma_buf_map_attachment should return a buffer
properly dma_mapped. Add calls to dma_map_sg to begin_cpu_access to
ensure this happens. As a side effect, this lets Ion buffers take
advantage of the dma_buf sync ioctls.
Signed-off-by: Laura Abbott <labbott@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
Ion currently returns a single sg_table on each dma_map call. This is
incorrect for later usage.
Signed-off-by: Laura Abbott <labbott@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
The align field was supposed to be used to specify the alignment of
the allocation. Nobody actually does anything with it except to check
if the alignment specified is out of bounds. Since this has no effect
on the actual allocation, just remove it.
Signed-off-by: Laura Abbott <labbott@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
The reference counting of dma_map calls was removed. Remove the
associated counter field as well.
Signed-off-by: Laura Abbott <labbott@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-next
Third set of new device support, cleanups and features for IIO in the 4.12 cycle
Somewhat dominated in patch numbers of last of the outreachy application
window related patches (they are still coming, despite window being closed
which is good to see!)
Good set of new drivers as well.
New device support
* ASPEED ADC
- new driver
* cpcap PMIC ADC
- new driver
* hid-humidity
- driver for HID compatible humidity sensors.
* ltc2497 ADC
- new driver
* mpu6050
- bring bindings up to date and add trivial support for 9250
* rockchip-saradc
- update bindings to cover rk3328
* vl6180 light, proximity and time of flight sensor.
- new driver
Features
* meson-saradc
- add calibration
Cleanup and minor fixes
* ad5504
- constify attribute_group structure
- drop casting of void *
* ad7150
- replace some shifts of 1 by BIT macro usage
* ad7152
- blank lines between function definitions
* ad7280a
- octal permissions.
* ad7606
- replace use of core mlock mutex with a local lock
* ad7746
- replace some shifts of 1 by BIT macro usage
- function parameter alignment
- drop some excessive brackets (introduced in last pull request)
* ad7753
- white space cleanup
* ad7754
- includes in alphabetical order and groupped appropriately.
- change from missuse of internal mlock mutex to using the buffer lock to
also protect values during frequency update.
* ad779x
- constify attribute_group structures
* ad9832
- octal permissions
* adis16060
- remove use of core mlock mutex in favour of adding a local
_spi_write_then_read which can use the local buffer protection lock.
- fix naming of above function.
* adis16203
- remove locking during reads of calibbias that doesn't protect anything
not protected elsewhere.
* adis16209
- remove unnecessary braces in single statement if
* adis16240
- remove unnecessary braces in single statement if
* adt7136
- drop excess blank lines and put some in between functions.
* ams-iaq
- replace comma with semi colon. Not actual bug, just unusual syntax.
* apds9960
- constify attribute group structure
* as3935
- constify attribute group structure
* bm1750
- constify attribute group structure
* cros_ec
- devm version of triggered buffer setup to simplify code.
* exynos
- drop casting of void *
* hdc100x
- constify attribute_group structure
* hid-accel
- fix wrong scale for newly introduced gravity sensor.
* hts221
- drop casting of void *
* hx711
- constify attribute_group structure
* imx7d_adc
- drop casting of void *
* lm35333
- constify attribute_group structure
* lsm6dsx
- drop casting of void *
- hold ODR configuration until enabling to avoid a race condition.
* max1027
- drop casting of void *
* max11100
- fix a comma where semicolon was intended (no actual bug, just odd)
* max1363
- constify attribute_group structure
* ms sensors
- drop casting of void *
* rockchip_saradc
- drop casting of void *
* sun4i-gpadc
- fix missing dependency on THERMAL or presence of stubs (issue only
introduced in pervious set)
- drop casting of void *
* tsl2x7x
- fix wrong standard deviation calc. Note these aren't actually used for
anything at the moment so bug didn't really matter.
- constify attribute group structure.
* vf610adc
- drop casting of void *
* vz89x
- replace comma with semicolon. Not actual bug, just odd syntax.
* zpa2326
- drop casting of void *
|
|
This patch allows to avoid a transitory that occurs when a given sensor
has been already enabled (e.g. gyroscope) and the user is configuring
the sample frequency of the other one (e.g. accelerometer).
The transitory lasts until the accelerometer is enabled.
During that time slice the gyroscope ODR is incorrectly modified as well.
At the end of the transitory both sensors work at the right frequency.
Fix it introducing st_lsm6dsx_check_odr() routine to check ODR consistency
in write_raw handler in order to apply frequency configuration just
in st_lsm6dsx_set_odr()
Fixes: 290a6ce11d93 (iio: imu: add support to lsm6dsx driver)
Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@st.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
|
|
With CONFIG_THERMAL=m and CONFIG_SUN4I_GPADC=y, we get a link error
from calling devm_thermal_zone_of_sensor_register:
drivers/iio/built-in.o: In function `sun4i_gpadc_probe':
:(.text+0x1c284): undefined reference to `devm_thermal_zone_of_sensor_register'
This adds a Kconfig dependency to ensure we can only have the ADC
driver as built-in when this function is also built-in, or when
we see the empty stub implementation. When the thermal code is
a module, we can still build the adc driver as a module, too.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Fixes: d1caa99055382 ("iio: adc: add support for Allwinner SoCs ADC")
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
|
|
This patch adds support for the Analog Devices / Linear Technology
LTC2497 ADCs. The LTC2497 is a 16-channel (eight differential),
16-bit, high precision, delta-sigma ADC with an automatic, differential,
input current cancellation front end and a 2-wire, I2C interface.
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
|
|
This fixes the coding style issue of using S_IWUSR in place of 4-digit
octal numbers.
Issue detected by checkpatch.
Signed-off-by: Guru Das Srinagesh <gurooodas@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
|
|
The mpu9250 is a SIP containing an mpu6500 and an ak8975. If this was all
there was too it there would be no need for explicit handling in the driver.
Arguably the bindings would also only reflect the presence of an mpu6500 with
the ak8975 hanging off it, as the kernel doesn't care that they are in one
package.
However, the WHOAMI value changes as well so best to add explicit support.
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
|
|
These bindings are somewhat lagging the state of the driver. The i2c-gate
bindings are documented elsewhere, but it seems sensible to at least have
an example and cross reference in here. SPI bindings will need to be the
subject of a future patch.
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Acked-by: Rob Herring <robh@kernel.org>
|
|
The rk3328 saradc is the same as rk3399.
Signed-off-by: Liang Chen <cl@rock-chips.com>
Reviewed-by: Heiko Stuebner <heiko@sntech.de>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
|
|
The following Coccinelle script was used to detect this:
@r@
expression x;
void* e;
type T;
identifier f;
@@
(
*((T *)e)
|
((T *)x)[...]
|
((T*)x)->f
|
- (T*)
e
)
Signed-off-by: simran singhal <singhalsimran0@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
|
|
The following Coccinelle script was used to detect this:
@r@
expression x;
void* e;
type T;
identifier f;
@@
(
*((T *)e)
|
((T *)x)[...]
|
((T*)x)->f
|
- (T*)
e
)
Signed-off-by: simran singhal <singhalsimran0@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
|
|
The following Coccinelle script was used to detect this:
@r@
expression x;
void* e;
type T;
identifier f;
@@
(
*((T *)e)
|
((T *)x)[...]
|
((T*)x)->f
|
- (T*)
e
)
Signed-off-by: simran singhal <singhalsimran0@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
|
|
The following Coccinelle script was used to detect this:
@r@
expression x;
void* e;
type T;
identifier f;
@@
(
*((T *)e)
|
((T *)x)[...]
|
((T*)x)->f
|
- (T*)
e
)
Signed-off-by: simran singhal <singhalsimran0@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
|
|
The following Coccinelle script was used to detect this:
@r@
expression x;
void* e;
type T;
identifier f;
@@
(
*((T *)e)
|
((T *)x)[...]
|
((T*)x)->f
|
- (T*)
e
)
Signed-off-by: simran singhal <singhalsimran0@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
|
|
The following Coccinelle script was used to detect this:
@r@
expression x;
void* e;
type T;
identifier f;
@@
(
*((T *)e)
|
((T *)x)[...]
|
((T*)x)->f
|
- (T*)
e
)
Signed-off-by: simran singhal <singhalsimran0@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
|
|
Change the name of function from adis16060_spi_write_than_read()
to adis16060_spi_write_then_read(). change "than" to "then" as
its time depended.
Signed-off-by: simran singhal <singhalsimran0@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
|
|
Check for attribute_group structures that are only stored in the
event_attrs filed of iio_info structure. As the event_attrs field of
iio_info structures is constant, so these attribute_group structures can
also be declared constant. Done using coccinelle:
@r1 disable optional_qualifier @
identifier i;
position p;
@@
static struct attribute_group i@p = {...};
@ok1@
identifier r1.i;
position p;
struct iio_info x;
@@
x.event_attrs=&i@p;
@bad@
position p!={r1.p,ok1.p};
identifier r1.i;
@@
i@p
@depends on !bad disable optional_qualifier@
identifier r1.i;
@@
static
+const
struct attribute_group i={...};
@depends on !bad disable optional_qualifier@
identifier r1.i;
@@
+const
struct attribute_group i;
As the attrs field of iio_info structures is also constant, so these
attribute_group structures can also be declared constant. Done manually.
File size before:
text data bss dec hex filename
5798 2376 0 8174 1fee drivers/iio/light/lm3533-als.o
File size after:
text data bss dec hex filename
5926 2248 0 8174 1fee drivers/iio/light/lm3533-als.o
Signed-off-by: simran singhal <singhalsimran0@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
|
|
Aspeed BMC SoCs include a 16 channel, 10-bit ADC. Low and high threshold
interrupts are supported by the hardware but are not currently implemented.
Signed-off-by: Rick Altherr <raltherr@google.com>
Tested-by: Xo Wang <xow@google.com>
Reviewed-by: Joel Stanley <joel@jms.id.au>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
|
|
Signed-off-by: Rick Altherr <raltherr@google.com>
Acked-by: Joel Stanley <joel@jms.id.au>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
|
|
As the event_attrs field of iio_info structures is constant, so these
attribute_group structures can also be declared constant.
File size before:
text data bss dec hex filename
15064 1528 0 16592 40d0
drivers/staging/iio/light/tsl2x7x_core.o
File size after:
text data bss dec hex filename
15192 1400 0 16592 40d0
drivers/staging/iio/light/tsl2x7x_core.o
Signed-off-by: simran singhal <singhalsimran0@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
|
|
Check for attribute_group structures that are only stored in the
attrs filed of iio_info structure. As the attrs field of iio_info
structures is constant, so these attribute_group structures can also be
declared constant.
Done using coccinelle:
@r1 disable optional_qualifier @
identifier i;
position p;
@@
static struct attribute_group i@p = {...};
@ok1@
identifier r1.i;
position p;
struct iio_info x;
@@
x.attrs=&i@p;
@bad@
position p!={r1.p,ok1.p};
identifier r1.i;
@@
i@p
@depends on !bad disable optional_qualifier@
identifier r1.i;
@@
static
+const
struct attribute_group i={...};
@depends on !bad disable optional_qualifier@
identifier r1.i;
@@
+const
struct attribute_group i;
File size before:
text data bss dec hex filename
3042 480 0 3522 dc2 drivers/iio/adc/hx711.o
File size after:
text data bss dec hex filename
3098 416 0 3514 dba drivers/iio/adc/hx711.o
Signed-off-by: simran singhal <singhalsimran0@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
|