diff options
author | Mauro Carvalho Chehab <mchehab@redhat.com> | 2008-11-20 10:52:20 -0200 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2008-11-20 10:52:20 -0200 |
commit | 0f71f2e1c83c02abd71844758e0d739b56bf4a2c (patch) | |
tree | 1319b676d0304129d2217445e86c95dd1fb6e0cf /linux | |
parent | 35cb6cec59b1bb3b8be8548c146894dbbee5ca13 (diff) | |
download | mediapointer-dvb-s2-0f71f2e1c83c02abd71844758e0d739b56bf4a2c.tar.gz mediapointer-dvb-s2-0f71f2e1c83c02abd71844758e0d739b56bf4a2c.tar.bz2 |
Introduce a new function that writes to a single register. This is
From: Devin Heitmueller <devin.heitmueller@gmail.com>
useful because the vast majority of register writes are a single
register, and this format permits or'ing register value bits together.
Signed-off-by: Devin Heitmueller <devin.heitmueller@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'linux')
-rw-r--r-- | linux/drivers/media/video/em28xx/em28xx-core.c | 6 | ||||
-rw-r--r-- | linux/drivers/media/video/em28xx/em28xx.h | 2 |
2 files changed, 8 insertions, 0 deletions
diff --git a/linux/drivers/media/video/em28xx/em28xx-core.c b/linux/drivers/media/video/em28xx/em28xx-core.c index 5292ca29d..dacb6cc5a 100644 --- a/linux/drivers/media/video/em28xx/em28xx-core.c +++ b/linux/drivers/media/video/em28xx/em28xx-core.c @@ -196,6 +196,12 @@ int em28xx_write_regs(struct em28xx *dev, u16 reg, char *buf, int len) return rc; } +/* Write a single register */ +int em28xx_write_reg(struct em28xx *dev, u16 reg, u8 val) +{ + return em28xx_write_regs(dev, reg, &val, 1); +} + /* * em28xx_write_reg_bits() * sets only some bits (specified by bitmask) of a register, by first reading diff --git a/linux/drivers/media/video/em28xx/em28xx.h b/linux/drivers/media/video/em28xx/em28xx.h index fae80c42d..9f96128df 100644 --- a/linux/drivers/media/video/em28xx/em28xx.h +++ b/linux/drivers/media/video/em28xx/em28xx.h @@ -568,6 +568,8 @@ int em28xx_read_reg(struct em28xx *dev, u16 reg); int em28xx_write_regs_req(struct em28xx *dev, u8 req, u16 reg, char *buf, int len); int em28xx_write_regs(struct em28xx *dev, u16 reg, char *buf, int len); +int em28xx_write_reg(struct em28xx *dev, u16 reg, u8 val); + int em28xx_audio_analog_set(struct em28xx *dev); int em28xx_audio_setup(struct em28xx *dev); |