18 Aug, 2013
1 commit
-
Add a resource managed devm_iio_trigger_alloc()/devm_iio_triger_free()
to automatically clean up triggers allocated by IIO drivers, thus
leading to simplified IIO drivers code.Signed-off-by: Jacek Anaszewski
Signed-off-by: Kyunmin Park
Signed-off-by: Jonathan Cameron
17 Aug, 2013
13 commits
-
The GPADC is general purpose ADC found on TWL6030, and TWL6032 PMIC,
known also as Phoenix and PhoenixLite.The TWL6030 and TWL6032 have GPADC with 17 and 19 channels
respectively. Some channels have current source and are used for
measuring voltage drop on resistive load for detecting battery ID
resistance, or measuring voltage drop on NTC resistors for external
temperature measurements. Some channels measure voltage, (i.e. battery
voltage), and have voltage dividers, thus, capable to scale voltage.
Some channels are dedicated for measuring die temperature.Some channels are calibrated in 2 points, having offsets from ideal
values kept in trim registers. This is used to correct measurements.The differences between GPADC in TWL6030 and TWL6032:
- 10 bit vs 12 bit ADC;
- 17 vs 19 channels;
- channels have different purpose(i.e. battery voltage
channel 8 vs channel 18);
- trim values are interpreted differently.Based on the driver patched from Balaji TK, Graeme Gregory, Ambresh K,
Girish S Ghongdemath.Signed-off-by: Balaji T K
Signed-off-by: Graeme Gregory
Signed-off-by: Oleksandr Kozaruk
Signed-off-by: Jonathan Cameron -
The LRADC virtual channels have an 18 bit field to store the sum of up
to 2^5 accumulated samples. The read_raw function however only operates
over a single sample (12 bit resolution).
In order to use this field for scaling operations, we need it to be the
exact resolution value of the LRADC.
Besides, the driver was using an 18 bit mask (LRADC_CH_VALUE_MASK) to
report touch coordinates to userland. A 12 bit mask should be used instead
or else the touch libraries will expect a coordinates range between 0
and 0x3ffff (18 bits), instead of between 0 and 0xfff (12 bits).Signed-off-by: Hector Palacios
Acked-by: Marek Vasut
Acked-by: Alexandre Belloni
Signed-off-by: Jonathan Cameron -
Using devm_iio_device_alloc makes code simpler.
Signed-off-by: Sachin Kamat
Acked-by: Lars-Peter Clausen
Signed-off-by: Jonathan Cameron -
Using devm_iio_device_alloc makes code simpler.
Signed-off-by: Sachin Kamat
Cc: Denis Ciocca
Signed-off-by: Jonathan Cameron -
Using devm_iio_device_alloc makes code simpler.
Signed-off-by: Sachin Kamat
Cc: Christian Strobel
Signed-off-by: Jonathan Cameron -
Using devm_iio_device_alloc makes code simpler.
Signed-off-by: Sachin Kamat
Signed-off-by: Jonathan Cameron -
Using devm_iio_device_alloc makes code simpler.
Signed-off-by: Sachin Kamat
Cc: Srinivas Pandruvada
Signed-off-by: Jonathan Cameron -
Using devm_iio_device_alloc makes code simpler.
Signed-off-by: Sachin Kamat
Acked-by: Lars-Peter Clausen
Signed-off-by: Jonathan Cameron -
Using devm_iio_device_alloc makes code simpler.
Signed-off-by: Sachin Kamat
Cc: Lars-Peter Clausen
Signed-off-by: Jonathan Cameron -
Using devm_iio_device_alloc makes code simpler.
Signed-off-by: Sachin Kamat
Acked-by: Lars-Peter Clausen
Signed-off-by: Jonathan Cameron -
Using devm_iio_device_alloc makes code simpler.
Signed-off-by: Sachin Kamat
Acked-by: Lars-Peter Clausen
Signed-off-by: Jonathan Cameron -
Signed-off-by: Peter Meerwald
Signed-off-by: Jonathan Cameron -
the TI TMP006 is a non-contact temperature sensor with I2C interface;
it measures the surface temperature of a distance object using a
thermopile to absorb IR energy emitted from the objectthe sensor has two channels: IR sensor voltage (16-bit) and reference
temperature of the chip (14-bit); datasheet is here:
http://www.ti.com/lit/ds/symlink/tmp006.pdfv2 (thanks to Grygorii Strashko, Lars-Peter Clausen, Jonathan Cameron
for review comments):
* power down device on driver remove
* use sign_extend32()
* style cleanup
* add comments what channel raw LSBs mean
* spelling of thermopileSigned-off-by: Peter Meerwald
Cc: Grygorii Strashko
Cc: Lars-Peter Clausen
Cc: Jonathan Cameron
Cc: LM Sensors
Signed-off-by: Jonathan Cameron
16 Aug, 2013
12 commits
-
Macro get_unused_fd() is used to allocate a file descriptor with
default flags. Those default flags (0) can be "unsafe":
O_CLOEXEC must be used by default to not leak file descriptor
across exec().Instead of macro get_unused_fd(), functions anon_inode_getfd()
or get_unused_fd_flags() should be used with flags given by userspace.
If not possible, flags should be set to O_CLOEXEC to provide userspace
with a default safe behavor.In a further patch, get_unused_fd() will be removed so that
new code start using anon_inode_getfd() or get_unused_fd_flags()
with correct flags.This patch replaces calls to get_unused_fd() with call to
get_unused_fd_flags(O_CLOEXEC) following advice from Erik Gilling.Signed-off-by: Yann Droneaud
Cc: Erik Gilling
Cc: Colin Cross
Link: http://lkml.kernel.org/r/CACSP8SjXGMk2_kX_+RgzqqQwqKernvF1Wt3K5tw991W5dfAnCA@mail.gmail.com
Link: http://lkml.kernel.org/r/cover.1376327678.git.ydroneaud@opteya.com
Signed-off-by: Greg Kroah-Hartman -
Macro get_unused_fd() is used to allocate a file descriptor with
default flags. Those default flags (0) can be "unsafe":
O_CLOEXEC must be used by default to not leak file descriptor
across exec().Instead of macro get_unused_fd(), functions anon_inode_getfd()
or get_unused_fd_flags() should be used with flags given by userspace.
If not possible, flags should be set to O_CLOEXEC to provide userspace
with a default safe behavor.In a further patch, get_unused_fd() will be removed so that
new code start using anon_inode_getfd() or get_unused_fd_flags()
with correct flags.This patch replaces calls to get_unused_fd() with call to
get_unused_fd_flags(O_CLOEXEC) following advice from Erik Gilling.Signed-off-by: Yann Droneaud
Cc: Erik Gilling
Cc: Colin Cross
Link: http://lkml.kernel.org/r/CACSP8SjZcpcpEtQHzcGYhf-MP7QGo0XpN7-uN7rmD=vNtopG=w@mail.gmail.com
Link: http://lkml.kernel.org/r/cover.1376327678.git.ydroneaud@opteya.com
Signed-off-by: Greg Kroah-Hartman -
The new structures being
typedef struct tagSCTS -> struct vnt_cts
typedef struct tagSCTS_FB -> struct vnt_cts_fbThese are only needed by rxtc.c so moved to rxtx.h and
will eventually form part of the structure of
struct vnt_tx_buffer.The linux/ieee80211.h in desc.h is no longer needed.
Signed-off-by: Malcolm Priestley
Signed-off-by: Greg Kroah-Hartman -
The new structures being
typedef struct tagSRTS_g -> struct vnt_rts_g
typedef struct tagSRTS_g_FB -> struct vnt_rts_g_fb
typedef struct tagSRTS_ab -> struct vnt_rts_ab
typedef struct tagSRTS_a_FB -> struct vnt_rts_a_fbThese are only needed by rxtc.c so moved to rxtx.h and
will eventually form part of the structure of
struct vnt_tx_buffer.Signed-off-by: Malcolm Priestley
Signed-off-by: Greg Kroah-Hartman -
Using an int which is casted to unsigned char as inbuf is messy.
The code won't work on big endian systems. The patch should fix
this.Signed-off-by: Jens Frederich
Signed-off-by: Greg Kroah-Hartman -
This patch replace some magic numbers. I believe it makes
the driver more readable.The magic number 0x26 is the XO system embedded controller
(EC) command 'DCON power enable/disable'.Number 0x41, and 0x42 are special memory controller settings
register. The 0x41 initialize bit sequence 0x101 means:
enable memory power down function and special SDRAM clock
delay for synchronize SDRAM output and clock signal.The 0x42 initialize squence 0x101 is wrong. According to
the specification Bit 8 is reserved, thus not in use.
I removed it.Signed-off-by: Jens Frederich
Signed-off-by: Greg Kroah-Hartman -
Replace with struct vnt_beacon_buffer.
Signed-off-by: Malcolm Priestley
Signed-off-by: Greg Kroah-Hartman -
Move vnt_tx_buffer *pTxBufHead to argument u8 *usbPacketBuf position.
Fix the calling to s_bPacketToWirelessUsb so it attached to
the calling struct vnt_tx_buffer pTX_Buffer.Signed-off-by: Malcolm Priestley
Signed-off-by: Greg Kroah-Hartman -
Rename to vnt_tx_buffer.
Signed-off-by: Malcolm Priestley
Signed-off-by: Greg Kroah-Hartman -
We should not use extra variable just to copy pointer value,
renaming parameter name serves pupose & removes extra variable.Signed-off-by: Rupesh Gujare
Signed-off-by: Greg Kroah-Hartman -
We are assigning value to hport before returning, there is
no need to initialize it.Signed-off-by: Rupesh Gujare
Signed-off-by: Greg Kroah-Hartman -
This patch removes the dgnc_proc.c and dgnc_proc.h files and all
references to proc functions in dgnc_driver.c. This also removes proc.h
from the include headers in driver.c, mgmt.c and sysfs.c and proc.o
from the Makefile.Drivers now use sysfs instead of proc.
Signed-off-by: Lidza Louina
Signed-off-by: Greg Kroah-Hartman
15 Aug, 2013
14 commits
-
alpha allmodconfig:
drivers/staging/comedi/drivers/das16.c: In function 'das16_detach':
drivers/staging/comedi/drivers/das16.c:1234: error: implicit declaration of function 'kfree'Cc: Ian Abbott
Reviewed-by: H Hartley Sweeten
Signed-off-by: Andrew Morton
Signed-off-by: Greg Kroah-Hartman -
The return value of uGetRTSCTSDuration always needs to be
corrected to a u16 little endian corrected value.Some places the endian correction is done on the next line
Change uGetRTSCTSDuration return u16 little endian corrected value.
Signed-off-by: Malcolm Priestley
Signed-off-by: Greg Kroah-Hartman -
A value is only returned when bNeedAck is true.
Only when byDurType == DATADUR_B is different.
Remove switch statement and simplify with if structure.
Signed-off-by: Malcolm Priestley
Signed-off-by: Greg Kroah-Hartman -
This is part of the Remote NDIS message format with patch
vt6656: rxtx.c: s_vGetFreeContext use single tx memset.
there is not need for this structure and its members.
Signed-off-by: Malcolm Priestley
Signed-off-by: Greg Kroah-Hartman -
All structure members of BEACON_BUFFER/TX_BUFFER should be packed.
Only the first 4 members of these structures are live.
The forth member is referenced at run-time by packed structures.
typedef struct tagSTxBufHead
typedef struct tagSTxShortBufHead
in desc.hIf these structures are not packed the alignment of these members
will be wrong.Signed-off-by: Malcolm Priestley
Signed-off-by: Greg Kroah-Hartman -
This patch separates success & failure block along with fixing
following issues:-1. The way oz_hcd_pd_arrived() looks now it's easy to think we free "ep" but
actually we do this spaghetti thing of setting it to NULL on success.2. It is hard to read it because there are unlocks scattered throughout.
3. Currently we set "ep" to NULL on the success path and then test it and or
free it. In current code you have to scroll to the start of the function
to read code.Original patch was submitted by Dan here :-
http://driverdev.linuxdriverproject.org/pipermail/driverdev-devel/2013-August/040113.htmlSigned-off-by: Dan Carpenter
Signed-off-by: Rupesh Gujare
Signed-off-by: Greg Kroah-Hartman -
Swap arguments of oz_ep_alloc() to match kmalloc() for better readability.
Signed-off-by: Rupesh Gujare
Reviewed-by: Dan Carpenter
Signed-off-by: Greg Kroah-Hartman -
Remove variable initialization wherever it is not required.
Signed-off-by: Rupesh Gujare
Reviewed-by: Dan Carpenter
Signed-off-by: Greg Kroah-Hartman -
oz_hcd_pd_departed() takes struct oz_port pointer instead of
void *, change function declaration to avoid ambiguity.Reported-by: Dan Carpenter
Signed-off-by: Rupesh Gujare
Reviewed-by: Dan Carpenter
Signed-off-by: Greg Kroah-Hartman -
oz_hcd_pd_arrived returns struct oz_port *, change function
declaration to avoid ambiguity.Reported-by: Dan Carpenter
Signed-off-by: Rupesh Gujare
Reviewed-by: Dan Carpenter
Signed-off-by: Greg Kroah-Hartman -
We are already checking "ep" earlier in function. Do not
need to check again.Reported-by: Dan Carpenter
Signed-off-by: Rupesh Gujare
Reviewed-by: Dan Carpenter
Signed-off-by: Greg Kroah-Hartman -
Put spaces around math operations.
Reported-by: Dan Carpenter
Signed-off-by: Rupesh Gujare
Reviewed-by: Dan Carpenter
Signed-off-by: Greg Kroah-Hartman -
Making code simpler for readability.
Reported-by: Dan Carpenter
Signed-off-by: Rupesh Gujare
Reviewed-by: Dan Carpenter
Signed-off-by: Greg Kroah-Hartman -
This patch adds a blank line between global declarations &
functions for readability.Signed-off-by: Rupesh Gujare
Reviewed-by: Dan Carpenter
Signed-off-by: Greg Kroah-Hartman