Juha Niskanen
0113b0db95
drivers: handle I2C_TRANSFER return value consistently. Some I2C peripherals transfers return zero on success, others number of completed transfers. Make drivers robust against this.
2017-08-04 07:31:36 -06:00
Jussi Kivilinna
dffb8a67e3
Add entropy pool and strong random number generator
...
Entropy pool gathers environmental noise from device drivers, user-space, etc., and returns good random numbers, suitable for cryptographic use. Based on entropy pool design from *BSDs and uses BLAKE2Xs algorithm for CSPRNG output.
Patch also adds /dev/urandom support for using entropy pool RNG and new 'getrandom' system call for getting randomness without file-descriptor usage (thus avoiding file-descriptor exhaustion attacks). The 'getrandom' interface is similar as 'getentropy' and 'getrandom' available on OpenBSD and Linux respectively.
2017-03-30 07:38:37 -06:00
Gregory Nutt
3872055daa
drivers/audio/wm8904: WM8904 has same problem as that fixed by Juha Niskanen in the MaxTouch driver.
2017-03-21 07:20:45 -06:00
Juha Niskanen
c3d9b86662
input/mxt: prevent overriding i2c transfer return value
...
put_reg/get_reg function was overriding i2c transfer error code with i2creset return value, that lead to OK status although actual transfer failed.
Signed-off-by: Juha Niskanen <juha.niskanen@haltian.com>
Reported-by: Harri Luhtala <harri.luhtala@haltian.com>
2017-03-21 07:12:07 -06:00
Gregory Nutt
02b1e1ec1a
Fixes for coding standard: '*' needs to 'snuggle' with following variable name
2017-02-28 18:22:57 -06:00
Mark Schulte
b3222bbc8a
irq_dispatch: Add argument pointer to irq_dispatch
...
Provide a user defined callback context for irq's, such that when
registering a callback users can provide a pointer that will get
passed back when the isr is called.
2017-02-27 06:27:56 -06:00
Gregory Nutt
4fcbe8e410
drivers: Disable priority inheritance on all semaphores used for signaling
2016-11-03 11:00:47 -06:00
Gregory Nutt
2a751068e6
Without lowsyslog() *llerr() is not useful. Eliminate and replace with *err().
2016-06-20 12:44:38 -06:00
Gregory Nutt
0665c7e06c
drivers/: Change some nerr() ERRORS to ninfo() and nwarn() WARNINGS.
2016-06-12 09:26:12 -06:00
Gregory Nutt
a1469a3e95
Add CONFIG_DEBUG_ERROR. Change names of *dbg() * *err()
2016-06-11 15:50:49 -06:00
Gregory Nutt
e99301d7c2
Rename *lldbg to *llerr
2016-06-11 14:55:27 -06:00
Gregory Nutt
fc3540cffe
Replace all occurrences of vdbg with vinfo
2016-06-11 11:59:51 -06:00
Gregory Nutt
3a74a438d9
Rename CONFIG_DEBUG_VERBOSE to CONFIG_DEBUG_INFO
2016-06-11 11:50:18 -06:00
Gregory Nutt
2244ed46bc
nuttx/drivers: Replace irqsave() with enter_critical_section(); replace irqrestore() with leave_critical_section()
2016-02-14 07:32:58 -06:00
Gregory Nutt
9ce58ad5b7
I2C: up_i2creset should not be a global function; Now it is an I2C interface method
2016-02-02 11:21:48 -06:00
Gregory Nutt
69ce24c70c
I2C: Remove the setfrequency method from the interface
2016-02-01 16:31:13 -06:00
Gregory Nutt
6ad641888b
Add I2C frequency to the i2c_msg_s structure
2016-02-01 14:17:20 -06:00
Gregory Nutt
3a781a2d3f
Remove I2C slave methods from I2C master interface; rename i2c_dev_s to i2c_master_s.
2016-01-30 08:36:47 -06:00
Gregory Nutt
ceb415204e
Move include/nuttx/i2c.h to include/nuttx/i2c/i2c_master.h
2016-01-30 08:00:16 -06:00
Gregory Nutt
cf14f8d1b5
drivers/: Fixes to spacing and alignement
2015-10-10 10:41:00 -06:00
Gregory Nutt
2994448d85
More fixes to problems noted by cppcheck. Some are kind of risky; some are real bugs.
2014-11-25 13:15:09 -06:00
Gregory Nutt
205260d5e2
Reanem kzalloc to kmm_zalloc for consistency
2014-08-31 17:34:44 -06:00
Gregory Nutt
54fa3b0b59
Rename kfree to kmm_free for consistency with other naming conventions
2014-08-31 17:04:02 -06:00
Gregory Nutt
cc09d75180
MXT driver: Fix error in thread test... backward logic
2014-07-16 22:13:41 -06:00
Gregory Nutt
44e6516213
maXTouch: Add thresholding so that MOVE reports are not generated unless there is a significant change in the reported position
2014-07-12 14:00:33 -06:00
Gregory Nutt
4548ea731e
maXTouch: Fix error in state machine
2014-07-12 11:23:07 -06:00
Gregory Nutt
f97113c5ef
SAMA5D4-EK: The maXTouch controller and test is now enabled by default in the NSH configuration
2014-07-10 08:42:25 -06:00
Gregory Nutt
3b0a797216
MXT driver works
2014-07-10 07:16:38 -06:00
Gregory Nutt
22fbcbb852
MXT driver is now at least partially functional
2014-07-09 18:56:53 -06:00
Gregory Nutt
e9362128bd
SAMA5 TWI: Add support for up_i2creset
2014-07-09 09:51:28 -06:00
Gregory Nutt
25f419d487
MXT Driver: Make sure that all return values are checked: Fix worker thread -- it must hold the MXT device semaphore to access I2C
2014-07-08 08:55:43 -06:00
Gregory Nutt
ab8506163a
maXTouch: Fix some issues with interrupt handling
2014-07-07 13:25:20 -06:00
Gregory Nutt
5bbc0a0dd9
maXTouch: Check for successful memory allocation was backward
2014-07-07 09:55:39 -06:00
Gregory Nutt
09d0e2bdd2
maXTouch: Be consistent. Failure return values are not just non-zero, but negative
2014-07-06 09:08:38 -06:00
Gregory Nutt
4afc23d16d
maXTouch: Fix test of I2C_TRANSFER return value
2014-07-06 08:51:38 -06:00
Gregory Nutt
b4d3cebc2f
maXTouch: Fix I2C address, errors when debug enable, reorganize some data
2014-07-06 08:03:34 -06:00
Gregory Nutt
3e9f29ba07
Add very basic support for the Atmel maXTouch touchscreen controller
2014-07-05 11:47:54 -06:00