diff options
author | Takashi Iwai <tiwai@suse.de> | 2021-07-01 08:34:15 +0200 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2021-07-01 08:34:15 +0200 |
commit | 498386d1c4d98a72db7a2f51473593ad563b45ae (patch) | |
tree | f94e6b211b9a50106e6e047cd992ae3e209ef007 /drivers/soundwire | |
parent | MAINTAINERS: remove Timur Tabi from Freescale SOC sound drivers (diff) | |
parent | ALSA: hda/realtek: fix mute/micmute LEDs for HP EliteBook 830 G8 Notebook PC (diff) | |
download | linux-498386d1c4d98a72db7a2f51473593ad563b45ae.tar.xz linux-498386d1c4d98a72db7a2f51473593ad563b45ae.zip |
Merge branch 'for-next' into for-linus
Diffstat (limited to 'drivers/soundwire')
-rw-r--r-- | drivers/soundwire/bus.c | 17 | ||||
-rw-r--r-- | drivers/soundwire/bus.h | 13 |
2 files changed, 16 insertions, 14 deletions
diff --git a/drivers/soundwire/bus.c b/drivers/soundwire/bus.c index a9e0aa72654d..5d5b0bd59ae3 100644 --- a/drivers/soundwire/bus.c +++ b/drivers/soundwire/bus.c @@ -492,7 +492,7 @@ int sdw_read_no_pm(struct sdw_slave *slave, u32 addr) } EXPORT_SYMBOL(sdw_read_no_pm); -static int sdw_update_no_pm(struct sdw_slave *slave, u32 addr, u8 mask, u8 val) +int sdw_update_no_pm(struct sdw_slave *slave, u32 addr, u8 mask, u8 val) { int tmp; @@ -503,6 +503,21 @@ static int sdw_update_no_pm(struct sdw_slave *slave, u32 addr, u8 mask, u8 val) tmp = (tmp & ~mask) | val; return sdw_write_no_pm(slave, addr, tmp); } +EXPORT_SYMBOL(sdw_update_no_pm); + +/* Read-Modify-Write Slave register */ +int sdw_update(struct sdw_slave *slave, u32 addr, u8 mask, u8 val) +{ + int tmp; + + tmp = sdw_read(slave, addr); + if (tmp < 0) + return tmp; + + tmp = (tmp & ~mask) | val; + return sdw_write(slave, addr, tmp); +} +EXPORT_SYMBOL(sdw_update); /** * sdw_nread() - Read "n" contiguous SDW Slave registers diff --git a/drivers/soundwire/bus.h b/drivers/soundwire/bus.h index 40354469860a..7631ef5e71fb 100644 --- a/drivers/soundwire/bus.h +++ b/drivers/soundwire/bus.h @@ -201,19 +201,6 @@ static inline void sdw_fill_port_params(struct sdw_port_params *params, params->data_mode = data_mode; } -/* Read-Modify-Write Slave register */ -static inline int sdw_update(struct sdw_slave *slave, u32 addr, u8 mask, u8 val) -{ - int tmp; - - tmp = sdw_read(slave, addr); - if (tmp < 0) - return tmp; - - tmp = (tmp & ~mask) | val; - return sdw_write(slave, addr, tmp); -} - /* broadcast read/write for tests */ int sdw_bread_no_pm_unlocked(struct sdw_bus *bus, u16 dev_num, u32 addr); int sdw_bwrite_no_pm_unlocked(struct sdw_bus *bus, u16 dev_num, u32 addr, u8 value); |