Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions ddbridge/ddbridge-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
#include "ddbridge-i2c.h"
#include "ddbridge-io.h"
#include "ddbridge-ioctl.h"
#include "ddbridge-core.h"
#include <media/dvb_net.h>

struct workqueue_struct *ddb_wq;
Expand Down Expand Up @@ -105,6 +106,7 @@ DVB_DEFINE_MOD_OPT_ADAPTER_NR(adapter_nr);

/* copied from dvb-core/dvbdev.c because kernel version does not export it */


int ddb_dvb_usercopy(struct file *file,
unsigned int cmd, unsigned long arg,
int (*func)(struct file *file,
Expand Down Expand Up @@ -4070,7 +4072,7 @@ static struct class ddb_class = {
.devnode = ddb_devnode,
};

int ddb_class_create(void)
static int ddb_class_create(void)
{
ddb_major = register_chrdev(0, DDB_NAME, &ddb_fops);
if (ddb_major < 0)
Expand All @@ -4080,7 +4082,7 @@ int ddb_class_create(void)
return 0;
}

void ddb_class_destroy(void)
static void ddb_class_destroy(void)
{
class_unregister(&ddb_class);
unregister_chrdev(ddb_major, DDB_NAME);
Expand Down
31 changes: 31 additions & 0 deletions ddbridge/ddbridge-core.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
// SPDX-License-Identifier: GPL-2.0
/*
* ddbridge-core.c: Digital Devices bridge core functions
*
* Copyright (C) 2010-2017 Digital Devices GmbH
* Marcus Metzler <mocm@metzlerbros.de>
* Ralph Metzler <rjkm@metzlerbros.de>
*
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* version 2 only, as published by the Free Software Foundation.
*
*
* 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.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/

#ifndef _DDBRIDGE_SX8_H_
#define _DDBRIDGE_SX8_H_

int ddb_dvb_usercopy(struct file *file,
unsigned int cmd, unsigned long arg,
int (*func)(struct file *file,
unsigned int cmd, void *arg));
#endif
1 change: 1 addition & 0 deletions ddbridge/ddbridge-m4.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
#include "ddbridge.h"
#include "ddbridge-io.h"
#include "ddbridge-mci.h"
#include "ddbridge-m4.h"

struct m4_base {
struct mci_base mci_base;
Expand Down
30 changes: 30 additions & 0 deletions ddbridge/ddbridge-m4.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
// SPDX-License-Identifier: GPL-2.0
/*
* ddbridge-m4.c: Digital Devices MAX M4 driver
*
* Copyright (C) 2018 Digital Devices GmbH
* Marcus Metzler <mocm@metzlerbros.de>
* Ralph Metzler <rjkm@metzlerbros.de>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* version 2 only, as published by the Free Software Foundation.
*
*
* 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.
*
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, point your browser to
* http://www.gnu.org/copyleft/gpl.html
*/

#ifndef _DDBRIDGE_M4_H_
#define _DDBRIDGE_M4_H_

struct dvb_frontend *ddb_mx_attach(struct ddb_input *input, int nr, int tuner, int type);

#endif
10 changes: 4 additions & 6 deletions ddbridge/ddbridge-max.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@
#include "ddbridge.h"
#include "ddbridge-io.h"
#include "ddbridge-i2c.h"
#include "ddbridge-sx8.h"
#include "ddbridge-m4.h"

/* MAX LNB interface related module parameters */

Expand Down Expand Up @@ -482,8 +484,9 @@ int ddb_fe_attach_mxl5xx(struct ddb_input *input)

cfg = mxl5xx;
cfg.fw_priv = link;
if (dev->link[0].info->type == DDB_OCTONET)
if (dev->link[0].info->type == DDB_OCTONET) {
;/*cfg.ts_clk = 69;*/
}

demod = input->nr;
tuner = demod & 3;
Expand Down Expand Up @@ -519,11 +522,6 @@ int ddb_fe_attach_mxl5xx(struct ddb_input *input)
return 0;
}

/* MAX MCI related functions */
struct dvb_frontend *ddb_sx8_attach(struct ddb_input *input, int nr, int tuner,
int (**fn_set_input)(struct dvb_frontend *fe, int input));
struct dvb_frontend *ddb_mx_attach(struct ddb_input *input, int nr, int tuner, int type);


int ddb_fe_attach_mci(struct ddb_input *input, u32 type)
{
Expand Down
2 changes: 1 addition & 1 deletion ddbridge/ddbridge-mci.c
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ int ddb_mci_cmd(struct mci *state,
}


int ddb_mci_cmd_raw(struct mci *state,
static int ddb_mci_cmd_raw(struct mci *state,
struct mci_command *command, u32 command_len,
struct mci_result *result, u32 result_len)
{
Expand Down
1 change: 1 addition & 0 deletions ddbridge/ddbridge-sx8.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
#include "ddbridge.h"
#include "ddbridge-io.h"
#include "ddbridge-mci.h"
#include "ddbridge-sx8.h"

static int default_mod = 3;
module_param(default_mod, int, 0444);
Expand Down
29 changes: 29 additions & 0 deletions ddbridge/ddbridge-sx8.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
/*
* ddbridge-sx8.c: Digital Devices MAX SX8 driver
*
* Copyright (C) 2018 Digital Devices GmbH
* Marcus Metzler <mocm@metzlerbros.de>
* Ralph Metzler <rjkm@metzlerbros.de>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* version 2 only, as published by the Free Software Foundation.
*
*
* 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.
*
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, point your browser to
* http://www.gnu.org/copyleft/gpl.html
*/

#ifndef _DDBRIDGE_SX8_H_
#define _DDBRIDGE_SX8_H_

struct dvb_frontend *ddb_sx8_attach(struct ddb_input *input, int nr, int tuner,
int (**fn_set_input)(struct dvb_frontend *fe, int input));
#endif
3 changes: 1 addition & 2 deletions ddbridge/dvb_netstream.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,8 @@

#include <linux/net.h>
#include "dvb_netstream.h"
#include "ddbridge-core.h"

int ddb_dvb_usercopy(struct file *file, unsigned int cmd, unsigned long arg,
int (*func)(struct file *file, unsigned int cmd, void *arg));

static ssize_t ns_write(struct file *file, const char *buf,
size_t count, loff_t *ppos)
Expand Down
12 changes: 1 addition & 11 deletions frontends/drxk_hard.c
Original file line number Diff line number Diff line change
Expand Up @@ -62,16 +62,6 @@ static bool IsQAM(struct drxk_state *state)
state->m_OperationMode == OM_QAM_ITU_C;
}

bool IsA1WithPatchCode(struct drxk_state *state)
{
return state->m_DRXK_A1_PATCH_CODE;
}

bool IsA1WithRomCode(struct drxk_state *state)
{
return state->m_DRXK_A1_ROM_CODE;
}

#define NOA1ROM 0

#ifndef CHK_ERROR
Expand Down Expand Up @@ -492,7 +482,7 @@ static int WriteBlock(struct drxk_state *state, u32 Address,
#define DRXK_MAX_RETRIES_POWERUP 20
#endif

int PowerUpDevice(struct drxk_state *state)
static int PowerUpDevice(struct drxk_state *state)
{
int status;
u8 data = 0;
Expand Down
3 changes: 2 additions & 1 deletion frontends/stv0367dd.c
Original file line number Diff line number Diff line change
Expand Up @@ -1609,8 +1609,9 @@ static int ofdm_lock(struct stv_state *state)
writereg(state, R367_TSGENERAL,tmp2 & ~0x01);
}
msleep(FECTimeOut);
if( (OFDM_Status & 0x98) != 0x98 )
if( (OFDM_Status & 0x98) != 0x98 ) {
;//return -1;
}
//printk("lock 2\n");

{
Expand Down
2 changes: 2 additions & 0 deletions frontends/stv6111.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@

#include <media/dvb_frontend.h>

#include "stv6111.h"

static inline u32 MulDiv32(u32 a, u32 b, u32 c)
{
u64 tmp64;
Expand Down
2 changes: 2 additions & 0 deletions frontends/tda18212dd.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@

#include <media/dvb_frontend.h>

#include "tda18212dd.h"

#ifndef CHK_ERROR
#define CHK_ERROR(s) if ((status = s) < 0) break
#endif
Expand Down
2 changes: 2 additions & 0 deletions frontends/tda18271c2dd.c
Original file line number Diff line number Diff line change
Expand Up @@ -1307,6 +1307,8 @@ static struct dvb_tuner_ops tuner_ops = {
.get_bandwidth = get_bandwidth,
};

struct dvb_frontend *tda18271c2dd_attach(struct dvb_frontend *fe,
struct i2c_adapter *i2c, u8 adr);
struct dvb_frontend *tda18271c2dd_attach(struct dvb_frontend *fe,
struct i2c_adapter *i2c, u8 adr)
{
Expand Down