Commit 1c9b943c authored by Mauro Carvalho Chehab's avatar Mauro Carvalho Chehab

media: si2168: use bits instead of bool for flags

Using bool on struct is not recommended, as it wastes lots of
space. So, instead, let's use bits.

While here, convert the comments to kernel-doc format.
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+samsung@kernel.org>
parent 219031a6
...@@ -9,38 +9,43 @@ ...@@ -9,38 +9,43 @@
#define SI2168_H #define SI2168_H
#include <linux/dvb/frontend.h> #include <linux/dvb/frontend.h>
/* /**
* I2C address * struct si2168_config - configuration parameters for si2168
* 0x64 *
* @fe:
* frontend returned by driver
* @i2c_adapter:
* tuner I2C adapter returned by driver
* @ts_mode:
* Transport Stream mode. Can be:
* - %SI2168_TS_PARALLEL
* - %SI2168_TS_SERIAL
* - %SI2168_TS_TRISTATE
* - %SI2168_TS_CLK_MANUAL
* @ts_clock_inv:
* TS clock inverted
* @ts_clock_gapped:
* TS clock gapped
* @spectral_inversion:
* Inverted spectrum
*
* Note:
* The I2C address of this demod is 0x64.
*/ */
struct si2168_config { struct si2168_config {
/*
* frontend
* returned by driver
*/
struct dvb_frontend **fe; struct dvb_frontend **fe;
/*
* tuner I2C adapter
* returned by driver
*/
struct i2c_adapter **i2c_adapter; struct i2c_adapter **i2c_adapter;
/* TS mode */
#define SI2168_TS_PARALLEL 0x06 #define SI2168_TS_PARALLEL 0x06
#define SI2168_TS_SERIAL 0x03 #define SI2168_TS_SERIAL 0x03
#define SI2168_TS_TRISTATE 0x00 #define SI2168_TS_TRISTATE 0x00
#define SI2168_TS_CLK_MANUAL 0x20 #define SI2168_TS_CLK_MANUAL 0x20
u8 ts_mode; u8 ts_mode;
/* TS clock inverted */ /* Flags */
bool ts_clock_inv; unsigned int ts_clock_inv:1;
unsigned int ts_clock_gapped:1;
/* TS clock gapped */ unsigned int spectral_inversion:1;
bool ts_clock_gapped;
/* Inverted spectrum */
bool spectral_inversion;
}; };
#endif #endif
...@@ -34,12 +34,12 @@ struct si2168_dev { ...@@ -34,12 +34,12 @@ struct si2168_dev {
unsigned int chip_id; unsigned int chip_id;
unsigned int version; unsigned int version;
const char *firmware_name; const char *firmware_name;
bool active;
bool warm;
u8 ts_mode; u8 ts_mode;
bool ts_clock_inv; unsigned int active:1;
bool ts_clock_gapped; unsigned int warm:1;
bool spectral_inversion; unsigned int ts_clock_inv:1;
unsigned int ts_clock_gapped:1;
unsigned int spectral_inversion:1;
}; };
/* firmware command struct */ /* firmware command struct */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment