mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04:00
regmap: Changes for v4.19
Several small new features for regmap this time around:
- Support for SCCB, an I2C variant used on some media cards. This has
also pulled in an I2C commit from Peter Rosin as a dependency.
- Addition of an API for reading repeatedly from registers where the
address doesn't automatically increment like some ADC outputs or GPIO
status registers.
- Support for bulk I/O on Slimbus.
-----BEGIN PGP SIGNATURE-----
iQFHBAABCgAxFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAltxUxYTHGJyb29uaWVA
a2VybmVsLm9yZwAKCRAk1otyXVSH0B26B/9A/Q9P+92i0LZ2ecO3QltvPeIP46jR
gnS3WEmgMk/yIWR9wusF3Ju4gfTZ4L5DEkl+5iooqlg54e3c8l3OdDIsRXXiLtIK
+BOU9xW4u4sdmGjuXqkkGCWgz75r/Em07Z4y3pB5kl/KHGtQPOrrvS8/33ETjhKC
tg/SC8bdJ6ZSC2J1lVYA+IolNfVt0rvjY3TdXwm0qel9SmQIqrL8xilj/JV8Hmhg
6PSH9PIoIkSRgvqp1N0IOysVcDcwgjAEyg3eeH+L2S0y/YMPY88ndf7d8mpWdkzQ
KGEUxgB+qWBHMjRKTgu4sqal1KZxCPghxO5kRn4UBaZsxFDdnXbtDcRQ
=e1ml
-----END PGP SIGNATURE-----
Merge tag 'regmap-v4.19' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap
Pull regmap updates from Mark Brown:
"Several small new features for regmap this time around:
- Support for SCCB, an I2C variant used on some media cards. This has
also pulled in an I2C commit from Peter Rosin as a dependency.
- Addition of an API for reading repeatedly from registers where the
address doesn't automatically increment like some ADC outputs or
GPIO status registers.
- Support for bulk I/O on Slimbus"
* tag 'regmap-v4.19' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap:
regmap: Add regmap_noinc_read API
regmap: sccb: fix typo and sort headers alphabetically
i2c: smbus: add unlocked __i2c_smbus_xfer variant
regmap: add SCCB support
regmap: slimbus: add support to multi read/write
This commit is contained in:
commit
15bc88cd5f
9 changed files with 303 additions and 28 deletions
|
|
@ -463,7 +463,7 @@ static s32 i2c_smbus_xfer_emulated(struct i2c_adapter *adapter, u16 addr,
|
|||
msg[num-1].len++;
|
||||
}
|
||||
|
||||
status = i2c_transfer(adapter, msg, num);
|
||||
status = __i2c_transfer(adapter, msg, num);
|
||||
if (status < 0)
|
||||
goto cleanup;
|
||||
if (status != num) {
|
||||
|
|
@ -524,9 +524,24 @@ cleanup:
|
|||
* This executes an SMBus protocol operation, and returns a negative
|
||||
* errno code else zero on success.
|
||||
*/
|
||||
s32 i2c_smbus_xfer(struct i2c_adapter *adapter, u16 addr, unsigned short flags,
|
||||
char read_write, u8 command, int protocol,
|
||||
union i2c_smbus_data *data)
|
||||
s32 i2c_smbus_xfer(struct i2c_adapter *adapter, u16 addr,
|
||||
unsigned short flags, char read_write,
|
||||
u8 command, int protocol, union i2c_smbus_data *data)
|
||||
{
|
||||
s32 res;
|
||||
|
||||
i2c_lock_bus(adapter, I2C_LOCK_SEGMENT);
|
||||
res = __i2c_smbus_xfer(adapter, addr, flags, read_write,
|
||||
command, protocol, data);
|
||||
i2c_unlock_bus(adapter, I2C_LOCK_SEGMENT);
|
||||
|
||||
return res;
|
||||
}
|
||||
EXPORT_SYMBOL(i2c_smbus_xfer);
|
||||
|
||||
s32 __i2c_smbus_xfer(struct i2c_adapter *adapter, u16 addr,
|
||||
unsigned short flags, char read_write,
|
||||
u8 command, int protocol, union i2c_smbus_data *data)
|
||||
{
|
||||
unsigned long orig_jiffies;
|
||||
int try;
|
||||
|
|
@ -543,8 +558,6 @@ s32 i2c_smbus_xfer(struct i2c_adapter *adapter, u16 addr, unsigned short flags,
|
|||
flags &= I2C_M_TEN | I2C_CLIENT_PEC | I2C_CLIENT_SCCB;
|
||||
|
||||
if (adapter->algo->smbus_xfer) {
|
||||
i2c_lock_bus(adapter, I2C_LOCK_SEGMENT);
|
||||
|
||||
/* Retry automatically on arbitration loss */
|
||||
orig_jiffies = jiffies;
|
||||
for (res = 0, try = 0; try <= adapter->retries; try++) {
|
||||
|
|
@ -557,7 +570,6 @@ s32 i2c_smbus_xfer(struct i2c_adapter *adapter, u16 addr, unsigned short flags,
|
|||
orig_jiffies + adapter->timeout))
|
||||
break;
|
||||
}
|
||||
i2c_unlock_bus(adapter, I2C_LOCK_SEGMENT);
|
||||
|
||||
if (res != -EOPNOTSUPP || !adapter->algo->master_xfer)
|
||||
goto trace;
|
||||
|
|
@ -579,7 +591,7 @@ trace:
|
|||
|
||||
return res;
|
||||
}
|
||||
EXPORT_SYMBOL(i2c_smbus_xfer);
|
||||
EXPORT_SYMBOL(__i2c_smbus_xfer);
|
||||
|
||||
/**
|
||||
* i2c_smbus_read_i2c_block_data_or_emulated - read block or emulate
|
||||
|
|
|
|||
Loading…
Reference in a new issue