diff options
author | Hans Verkuil <hans.verkuil@cisco.com> | 2017-04-17 07:44:35 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@s-opensource.com> | 2017-04-19 06:50:52 -0300 |
commit | 56a263aaa0a5f58d70517fae2bdd63fc1e17efec (patch) | |
tree | 12804cdac321eb61783ac32901cf13fbeabf0a3e /include/media | |
parent | ee0fe833d96793853335844b6d99fb76bd12cbeb (diff) | |
download | linux-56a263aaa0a5f58d70517fae2bdd63fc1e17efec.tar.gz linux-56a263aaa0a5f58d70517fae2bdd63fc1e17efec.tar.bz2 linux-56a263aaa0a5f58d70517fae2bdd63fc1e17efec.zip |
[media] cec: Kconfig cleanup
The Kconfig options for the CEC subsystem were a bit messy. In
addition there were two cec sources (cec-edid.c and cec-notifier.c)
that were outside of the media/cec directory, which was weird.
Move those sources to media/cec as well.
The cec-edid and cec-notifier functionality is now part of the cec
module and these are no longer separate modules.
Also remove the MEDIA_CEC_EDID config option and include it with the
main CEC config option (which defined CEC_EDID anyway).
Added static inlines to cec-edid.h for dummy functions when CEC_CORE
isn't defined.
CEC drivers should now depend on CEC_CORE.
CEC drivers that need the cec-notifier functionality must explicitly
select CEC_NOTIFIER.
The s5p-cec and stih-cec drivers depended on VIDEO_DEV instead of
CEC_CORE, fix that as well.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Benjamin Gaignard <benjamin.gaignard@linaro.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Diffstat (limited to 'include/media')
-rw-r--r-- | include/media/cec-edid.h | 29 | ||||
-rw-r--r-- | include/media/cec.h | 2 |
2 files changed, 30 insertions, 1 deletions
diff --git a/include/media/cec-edid.h b/include/media/cec-edid.h index bdf731ecba1a..242781fd377f 100644 --- a/include/media/cec-edid.h +++ b/include/media/cec-edid.h @@ -26,6 +26,8 @@ #define cec_phys_addr_exp(pa) \ ((pa) >> 12), ((pa) >> 8) & 0xf, ((pa) >> 4) & 0xf, (pa) & 0xf +#if IS_ENABLED(CONFIG_CEC_CORE) + /** * cec_get_edid_phys_addr() - find and return the physical address * @@ -101,4 +103,31 @@ u16 cec_phys_addr_for_input(u16 phys_addr, u8 input); */ int cec_phys_addr_validate(u16 phys_addr, u16 *parent, u16 *port); +#else + +static inline u16 cec_get_edid_phys_addr(const u8 *edid, unsigned int size, + unsigned int *offset) +{ + if (offset) + *offset = 0; + return CEC_PHYS_ADDR_INVALID; +} + +static inline void cec_set_edid_phys_addr(u8 *edid, unsigned int size, + u16 phys_addr) +{ +} + +static inline u16 cec_phys_addr_for_input(u16 phys_addr, u8 input) +{ + return CEC_PHYS_ADDR_INVALID; +} + +static inline int cec_phys_addr_validate(u16 phys_addr, u16 *parent, u16 *port) +{ + return 0; +} + +#endif + #endif /* _MEDIA_CEC_EDID_H */ diff --git a/include/media/cec.h b/include/media/cec.h index b313e3ecab70..bae8d0153de7 100644 --- a/include/media/cec.h +++ b/include/media/cec.h @@ -204,7 +204,7 @@ static inline bool cec_is_sink(const struct cec_adapter *adap) return adap->phys_addr == 0; } -#if IS_ENABLED(CONFIG_MEDIA_CEC_SUPPORT) +#if IS_ENABLED(CONFIG_CEC_CORE) struct cec_adapter *cec_allocate_adapter(const struct cec_adap_ops *ops, void *priv, const char *name, u32 caps, u8 available_las); int cec_register_adapter(struct cec_adapter *adap, struct device *parent); |