linux/drivers/media/dvb-frontends/zd1301_demod.h
Thomas Gleixner c942fddf87 treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 157
Based on 3 normalized pattern(s):

  this program is free software you can redistribute it and or modify
  it under the terms of the gnu general public license as published by
  the free software foundation either version 2 of the license or at
  your option any later version this program is distributed in the
  hope that it will be useful but without any warranty without even
  the implied warranty of merchantability or fitness for a particular
  purpose see the gnu general public license for more details

  this program is free software you can redistribute it and or modify
  it under the terms of the gnu general public license as published by
  the free software foundation either version 2 of the license or at
  your option any later version [author] [kishon] [vijay] [abraham]
  [i] [kishon]@[ti] [com] this program is distributed in the hope that
  it will be useful but without any warranty without even the implied
  warranty of merchantability or fitness for a particular purpose see
  the gnu general public license for more details

  this program is free software you can redistribute it and or modify
  it under the terms of the gnu general public license as published by
  the free software foundation either version 2 of the license or at
  your option any later version [author] [graeme] [gregory]
  [gg]@[slimlogic] [co] [uk] [author] [kishon] [vijay] [abraham] [i]
  [kishon]@[ti] [com] [based] [on] [twl6030]_[usb] [c] [author] [hema]
  [hk] [hemahk]@[ti] [com] this program is distributed in the hope
  that it will be useful but without any warranty without even the
  implied warranty of merchantability or fitness for a particular
  purpose see the gnu general public license for more details

extracted by the scancode license scanner the SPDX license identifier

  GPL-2.0-or-later

has been chosen to replace the boilerplate/reference in 1105 file(s).

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Allison Randal <allison@lohutok.net>
Reviewed-by: Richard Fontana <rfontana@redhat.com>
Reviewed-by: Kate Stewart <kstewart@linuxfoundation.org>
Cc: linux-spdx@vger.kernel.org
Link: https://lkml.kernel.org/r/20190527070033.202006027@linutronix.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-05-30 11:26:37 -07:00

68 lines
1.8 KiB
C

/* SPDX-License-Identifier: GPL-2.0-or-later */
/*
* ZyDAS ZD1301 driver (demodulator)
*
* Copyright (C) 2015 Antti Palosaari <crope@iki.fi>
*/
#ifndef ZD1301_DEMOD_H
#define ZD1301_DEMOD_H
#include <linux/platform_device.h>
#include <linux/dvb/frontend.h>
#include <media/dvb_frontend.h>
/**
* struct zd1301_demod_platform_data - Platform data for the zd1301_demod driver
* @reg_priv: First argument of reg_read and reg_write callbacks.
* @reg_read: Register read callback.
* @reg_write: Register write callback.
*/
struct zd1301_demod_platform_data {
void *reg_priv;
int (*reg_read)(void *, u16, u8 *);
int (*reg_write)(void *, u16, u8);
};
#if IS_REACHABLE(CONFIG_DVB_ZD1301_DEMOD)
/**
* zd1301_demod_get_dvb_frontend() - Get pointer to DVB frontend
* @pdev: Pointer to platform device
*
* Return: Pointer to DVB frontend which given platform device owns.
*/
struct dvb_frontend *zd1301_demod_get_dvb_frontend(struct platform_device *pdev);
/**
* zd1301_demod_get_i2c_adapter() - Get pointer to I2C adapter
* @pdev: Pointer to platform device
*
* Return: Pointer to I2C adapter which given platform device owns.
*/
struct i2c_adapter *zd1301_demod_get_i2c_adapter(struct platform_device *pdev);
#else
/**
* zd1301_demod_get_dvb_frontend() - Attach a zd1301 frontend
* @dev: Pointer to platform device
*
* Return: Pointer to %struct dvb_frontend or NULL if attach fails.
*/
static inline struct dvb_frontend *zd1301_demod_get_dvb_frontend(struct platform_device *dev)
{
printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__);
return NULL;
}
static inline struct i2c_adapter *zd1301_demod_get_i2c_adapter(struct platform_device *dev)
{
printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__);
return NULL;
}
#endif
#endif /* ZD1301_DEMOD_H */