From patchwork Mon Apr 15 02:24:03 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Herdler X-Patchwork-Id: 789128 Received: from mout.gmx.net (mout.gmx.net [212.227.15.15]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C6C611401F for ; Mon, 15 Apr 2024 02:24:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=212.227.15.15 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713147880; cv=none; b=OF08ByMDZeGWRFC7yEajN0mt9D6AsFnVDMgV/kbizeHk3CE7m8CMYT2ASFtdKrXSzJ/TGfivtMDQfNIIddtWUWYTJkVWpR5/LynTI4q5Wv/66nu0++viYHWz1C8wptnpE+QGXxuxrnCYfo5ze/9Cr6uCKErFML6BtDCFHJrYdxc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713147880; c=relaxed/simple; bh=72vqYiEPxraFzozugc8BK1LdrjydwO1uozLbNXtfhg8=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=nlIhevbVlKJ5MDr2YIs0XreIvDAVWDzPZ3pKb5q75foDy+vwd7sknkOwZcefGVZLCE7OtARSV9RlxkkR7RzHbNZ20G60su/rD2JzlCXis+V235Fykc81Kt4ZyXvP2rpXge54PawIzoXbTh5A36uAwTxBuOuRtl32v9/6/EHmGVs= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=nurfuerspam.de; spf=pass smtp.mailfrom=nurfuerspam.de; dkim=pass (2048-bit key) header.d=nurfuerspam.de header.i=herdler@nurfuerspam.de header.b=Ijm1hXsh; arc=none smtp.client-ip=212.227.15.15 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=nurfuerspam.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=nurfuerspam.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=nurfuerspam.de header.i=herdler@nurfuerspam.de header.b="Ijm1hXsh" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nurfuerspam.de; s=s31663417; t=1713147872; x=1713752672; i=herdler@nurfuerspam.de; bh=Rj/fUlAMM0H2UIq38SoyhdmGg7CDebK5gtnlghnJZuc=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To: References; b=Ijm1hXshPJaAIEVoSyH2Xnh+AHxS7yOwOqaljEODZMHVDM72jbgq2WWsarbgjAUK eePFVZl1oCAPTVKE0gMMFbhSq5s3xPV3l509kSi4v0gpWzqPAnzo+OHivKSp/RhEf GU5yhcmR7QytKsV6Y+cDFjBLl3K6KjGJsdSMVbxonx6TisU1IRXP6DaXe0SY7mvV+ 6teSGDoo02Evs6GRQcIHWeCHbGnB8rejXu9IqILqk8oDOvyrgJHWi0vxVldSC0xyX aPc0z6ZhfQtob5YdGKmfYV7VAo4piC3NeXO9KFPiMZVF5elSxIcAgQFZRS21/Mq4x JO1NbgISmnxQJtePow== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from astro.haus ([91.132.223.107]) by mail.gmx.net (mrgmx005 [212.227.17.190]) with ESMTPSA (Nemesis) id 1M3UZ6-1rwjz80IBG-000Zp6; Mon, 15 Apr 2024 04:24:32 +0200 From: Stefan Herdler To: hverkuil-cisco@xs4all.nl Cc: linux-media@vger.kernel.org, smoch@web.de, tmn505@gmail.com, vinschen@redhat.com Subject: [PATCH v2 02/10] media: ttpci: coding style fixes: whitespace Date: Mon, 15 Apr 2024 04:24:03 +0200 Message-Id: <20240415022411.234580-3-herdler@nurfuerspam.de> X-Mailer: git-send-email 2.34.0 In-Reply-To: <20240415022411.234580-1-herdler@nurfuerspam.de> References: <20240415022411.234580-1-herdler@nurfuerspam.de> Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Provags-ID: V03:K1:IfaqP7JpAI77h4TQhdwZBhwhTYiQf8E7Nuq1c1BPoqWALWJjedu TfzKLQO5/cOr4+JTwOO+NGPFml+eON60WGpxdr9cfiXgjBLOC0FiOorexCKsVmpHTvxVEiZ XOPp1Jr4cwfbqOYIV6eN7fJ+r7rfDxUHIFk5EVTx6xDXwtUagTj9pPP6yop3am/wfHTQ+rq 6IL62UeKXkGSmdrCrCnsQ== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:b6Cdu1ebf70=;iQRUpVyBmJSGYezBBW56EsJ5q3a OEsJF83NuCwVE7AbFKeF61JRSgPyz/oiOU7mDxDqJ/oevUNbXohTCPFo0rBJCk6Ws//jEqA+7 UNY3wwW1k72vOl+CeG3lIbLVfjxt6LmtQou4PJwjNW3VgP7zdjNxz/5cw6jQdOMJfdapqt7Ag VmULeGy2ej11XKU5uhrrKM+AChnnLlqIKsY7vyZB0l5C4gbsMPGGfZ2YUh6ur2dOpZrGuy8no UQLR53z99Ue7gc+3hgm7l8Am8aO4Y7AkWr+JL+Pv0+TSFRVOtBaNkZltHUwrHG55SrE/gV3K6 lletvyCtmOQucbicRYfQJpJCg9BhpF8YxKR+Q8S2qd2AlZuqjHM8P0TxAdbEgBmxU8vhweuj2 W1zXUzv+J15Ah/ITPZ9OjaZSqSEJfuGf0wBVpGIT9jUX6ltEc5h9NR7iuqzJ/8aMKo2VNWQ1L /mGYZBG/IB+Mi3nFhlt4FHEugIbiuVMsCYudTQNAuUt+mT7zjtDeEZF4kRCwqJs6q0nX/zlWR nVXAwPDQeqhlKUYJpkHWVjeqaS3cmK+qbTGKJuWXwOaEugSJZlrMq71SnCXe86nn6E0wKFUW4 4o4vcj8V04SRh61QJmaEEh8V6Tp9xqpmacTbLegAk2nIYoTQMn6N5U/Mvd80ivDtppDba9Hs3 JZQlXLwfni2YhBrKossNQ4y4/8K8372MJFWk6cHy+dVG9fhebkoblf7JSAlrYC9B9hR6vETYB hnc5l+sctJWqdMDRgvkCqvDMKM5IW9+SPlnmgkDMpuOTA+1OtZppnWHHngEyDc7tqrcrSaVAm sueJiqIJwXeAXthcDQTbKM0hLkbfne8bxtSwO625KHGes= It fixes the following checkpatch errors: ERROR:SPACING: space prohibited before that ',' (ctx:WxW) ERROR:SPACING: space required after that ',' (ctx:VxV) ERROR:SWITCH_CASE_INDENT_LEVEL: switch and case should be at the same indent This patch contains the large multi line blocks. Signed-off-by: Stefan Herdler --- ========================= Changes since v1 =============================== 1. Title ========================================================================== drivers/media/pci/ttpci/budget-av.c | 464 ++++++++++++++-------------- drivers/media/pci/ttpci/budget-ci.c | 426 ++++++++++++------------- drivers/media/pci/ttpci/budget.c | 26 +- 3 files changed, 458 insertions(+), 458 deletions(-) -- 2.34.0 diff --git a/drivers/media/pci/ttpci/budget-av.c b/drivers/media/pci/ttpci/budget-av.c index 72ba9d3c3..b9efcd3cc 100644 --- a/drivers/media/pci/ttpci/budget-av.c +++ b/drivers/media/pci/ttpci/budget-av.c @@ -878,222 +878,222 @@ static const struct stv0299_config philips_sd1878_config = { /* KNC1 DVB-S (STB0899) Inittab */ static const struct stb0899_s1_reg knc1_stb0899_s1_init_1[] = { - { STB0899_DEV_ID , 0x81 }, - { STB0899_DISCNTRL1 , 0x32 }, - { STB0899_DISCNTRL2 , 0x80 }, - { STB0899_DISRX_ST0 , 0x04 }, - { STB0899_DISRX_ST1 , 0x00 }, - { STB0899_DISPARITY , 0x00 }, - { STB0899_DISSTATUS , 0x20 }, - { STB0899_DISF22 , 0x8c }, - { STB0899_DISF22RX , 0x9a }, - { STB0899_SYSREG , 0x0b }, - { STB0899_ACRPRESC , 0x11 }, - { STB0899_ACRDIV1 , 0x0a }, - { STB0899_ACRDIV2 , 0x05 }, - { STB0899_DACR1 , 0x00 }, - { STB0899_DACR2 , 0x00 }, - { STB0899_OUTCFG , 0x00 }, - { STB0899_MODECFG , 0x00 }, - { STB0899_IRQSTATUS_3 , 0x30 }, - { STB0899_IRQSTATUS_2 , 0x00 }, - { STB0899_IRQSTATUS_1 , 0x00 }, - { STB0899_IRQSTATUS_0 , 0x00 }, - { STB0899_IRQMSK_3 , 0xf3 }, - { STB0899_IRQMSK_2 , 0xfc }, - { STB0899_IRQMSK_1 , 0xff }, - { STB0899_IRQMSK_0 , 0xff }, - { STB0899_IRQCFG , 0x00 }, - { STB0899_I2CCFG , 0x88 }, - { STB0899_I2CRPT , 0x58 }, /* Repeater=8, Stop=disabled */ - { STB0899_IOPVALUE5 , 0x00 }, - { STB0899_IOPVALUE4 , 0x20 }, - { STB0899_IOPVALUE3 , 0xc9 }, - { STB0899_IOPVALUE2 , 0x90 }, - { STB0899_IOPVALUE1 , 0x40 }, - { STB0899_IOPVALUE0 , 0x00 }, - { STB0899_GPIO00CFG , 0x82 }, - { STB0899_GPIO01CFG , 0x82 }, - { STB0899_GPIO02CFG , 0x82 }, - { STB0899_GPIO03CFG , 0x82 }, - { STB0899_GPIO04CFG , 0x82 }, - { STB0899_GPIO05CFG , 0x82 }, - { STB0899_GPIO06CFG , 0x82 }, - { STB0899_GPIO07CFG , 0x82 }, - { STB0899_GPIO08CFG , 0x82 }, - { STB0899_GPIO09CFG , 0x82 }, - { STB0899_GPIO10CFG , 0x82 }, - { STB0899_GPIO11CFG , 0x82 }, - { STB0899_GPIO12CFG , 0x82 }, - { STB0899_GPIO13CFG , 0x82 }, - { STB0899_GPIO14CFG , 0x82 }, - { STB0899_GPIO15CFG , 0x82 }, - { STB0899_GPIO16CFG , 0x82 }, - { STB0899_GPIO17CFG , 0x82 }, - { STB0899_GPIO18CFG , 0x82 }, - { STB0899_GPIO19CFG , 0x82 }, - { STB0899_GPIO20CFG , 0x82 }, - { STB0899_SDATCFG , 0xb8 }, - { STB0899_SCLTCFG , 0xba }, - { STB0899_AGCRFCFG , 0x08 }, /* 0x1c */ - { STB0899_GPIO22 , 0x82 }, /* AGCBB2CFG */ - { STB0899_GPIO21 , 0x91 }, /* AGCBB1CFG */ - { STB0899_DIRCLKCFG , 0x82 }, - { STB0899_CLKOUT27CFG , 0x7e }, - { STB0899_STDBYCFG , 0x82 }, - { STB0899_CS0CFG , 0x82 }, - { STB0899_CS1CFG , 0x82 }, - { STB0899_DISEQCOCFG , 0x20 }, - { STB0899_GPIO32CFG , 0x82 }, - { STB0899_GPIO33CFG , 0x82 }, - { STB0899_GPIO34CFG , 0x82 }, - { STB0899_GPIO35CFG , 0x82 }, - { STB0899_GPIO36CFG , 0x82 }, - { STB0899_GPIO37CFG , 0x82 }, - { STB0899_GPIO38CFG , 0x82 }, - { STB0899_GPIO39CFG , 0x82 }, - { STB0899_NCOARSE , 0x15 }, /* 0x15 = 27 Mhz Clock, F/3 = 198MHz, F/6 = 99MHz */ - { STB0899_SYNTCTRL , 0x02 }, /* 0x00 = CLK from CLKI, 0x02 = CLK from XTALI */ - { STB0899_FILTCTRL , 0x00 }, - { STB0899_SYSCTRL , 0x00 }, - { STB0899_STOPCLK1 , 0x20 }, - { STB0899_STOPCLK2 , 0x00 }, - { STB0899_INTBUFSTATUS , 0x00 }, - { STB0899_INTBUFCTRL , 0x0a }, - { 0xffff , 0xff }, + { STB0899_DEV_ID, 0x81 }, + { STB0899_DISCNTRL1, 0x32 }, + { STB0899_DISCNTRL2, 0x80 }, + { STB0899_DISRX_ST0, 0x04 }, + { STB0899_DISRX_ST1, 0x00 }, + { STB0899_DISPARITY, 0x00 }, + { STB0899_DISSTATUS, 0x20 }, + { STB0899_DISF22, 0x8c }, + { STB0899_DISF22RX, 0x9a }, + { STB0899_SYSREG, 0x0b }, + { STB0899_ACRPRESC, 0x11 }, + { STB0899_ACRDIV1, 0x0a }, + { STB0899_ACRDIV2, 0x05 }, + { STB0899_DACR1, 0x00 }, + { STB0899_DACR2, 0x00 }, + { STB0899_OUTCFG, 0x00 }, + { STB0899_MODECFG, 0x00 }, + { STB0899_IRQSTATUS_3, 0x30 }, + { STB0899_IRQSTATUS_2, 0x00 }, + { STB0899_IRQSTATUS_1, 0x00 }, + { STB0899_IRQSTATUS_0, 0x00 }, + { STB0899_IRQMSK_3, 0xf3 }, + { STB0899_IRQMSK_2, 0xfc }, + { STB0899_IRQMSK_1, 0xff }, + { STB0899_IRQMSK_0, 0xff }, + { STB0899_IRQCFG, 0x00 }, + { STB0899_I2CCFG, 0x88 }, + { STB0899_I2CRPT, 0x58 }, /* Repeater=8, Stop=disabled */ + { STB0899_IOPVALUE5, 0x00 }, + { STB0899_IOPVALUE4, 0x20 }, + { STB0899_IOPVALUE3, 0xc9 }, + { STB0899_IOPVALUE2, 0x90 }, + { STB0899_IOPVALUE1, 0x40 }, + { STB0899_IOPVALUE0, 0x00 }, + { STB0899_GPIO00CFG, 0x82 }, + { STB0899_GPIO01CFG, 0x82 }, + { STB0899_GPIO02CFG, 0x82 }, + { STB0899_GPIO03CFG, 0x82 }, + { STB0899_GPIO04CFG, 0x82 }, + { STB0899_GPIO05CFG, 0x82 }, + { STB0899_GPIO06CFG, 0x82 }, + { STB0899_GPIO07CFG, 0x82 }, + { STB0899_GPIO08CFG, 0x82 }, + { STB0899_GPIO09CFG, 0x82 }, + { STB0899_GPIO10CFG, 0x82 }, + { STB0899_GPIO11CFG, 0x82 }, + { STB0899_GPIO12CFG, 0x82 }, + { STB0899_GPIO13CFG, 0x82 }, + { STB0899_GPIO14CFG, 0x82 }, + { STB0899_GPIO15CFG, 0x82 }, + { STB0899_GPIO16CFG, 0x82 }, + { STB0899_GPIO17CFG, 0x82 }, + { STB0899_GPIO18CFG, 0x82 }, + { STB0899_GPIO19CFG, 0x82 }, + { STB0899_GPIO20CFG, 0x82 }, + { STB0899_SDATCFG, 0xb8 }, + { STB0899_SCLTCFG, 0xba }, + { STB0899_AGCRFCFG, 0x08 }, /* 0x1c */ + { STB0899_GPIO22, 0x82 }, /* AGCBB2CFG */ + { STB0899_GPIO21, 0x91 }, /* AGCBB1CFG */ + { STB0899_DIRCLKCFG, 0x82 }, + { STB0899_CLKOUT27CFG, 0x7e }, + { STB0899_STDBYCFG, 0x82 }, + { STB0899_CS0CFG, 0x82 }, + { STB0899_CS1CFG, 0x82 }, + { STB0899_DISEQCOCFG, 0x20 }, + { STB0899_GPIO32CFG, 0x82 }, + { STB0899_GPIO33CFG, 0x82 }, + { STB0899_GPIO34CFG, 0x82 }, + { STB0899_GPIO35CFG, 0x82 }, + { STB0899_GPIO36CFG, 0x82 }, + { STB0899_GPIO37CFG, 0x82 }, + { STB0899_GPIO38CFG, 0x82 }, + { STB0899_GPIO39CFG, 0x82 }, + { STB0899_NCOARSE, 0x15 }, /* 0x15 = 27 Mhz Clock, F/3 = 198MHz, F/6 = 99MHz */ + { STB0899_SYNTCTRL, 0x02 }, /* 0x00 = CLK from CLKI, 0x02 = CLK from XTALI */ + { STB0899_FILTCTRL, 0x00 }, + { STB0899_SYSCTRL, 0x00 }, + { STB0899_STOPCLK1, 0x20 }, + { STB0899_STOPCLK2, 0x00 }, + { STB0899_INTBUFSTATUS, 0x00 }, + { STB0899_INTBUFCTRL, 0x0a }, + { 0xffff, 0xff }, }; static const struct stb0899_s1_reg knc1_stb0899_s1_init_3[] = { - { STB0899_DEMOD , 0x00 }, - { STB0899_RCOMPC , 0xc9 }, - { STB0899_AGC1CN , 0x41 }, - { STB0899_AGC1REF , 0x08 }, - { STB0899_RTC , 0x7a }, - { STB0899_TMGCFG , 0x4e }, - { STB0899_AGC2REF , 0x33 }, - { STB0899_TLSR , 0x84 }, - { STB0899_CFD , 0xee }, - { STB0899_ACLC , 0x87 }, - { STB0899_BCLC , 0x94 }, - { STB0899_EQON , 0x41 }, - { STB0899_LDT , 0xdd }, - { STB0899_LDT2 , 0xc9 }, - { STB0899_EQUALREF , 0xb4 }, - { STB0899_TMGRAMP , 0x10 }, - { STB0899_TMGTHD , 0x30 }, - { STB0899_IDCCOMP , 0xfb }, - { STB0899_QDCCOMP , 0x03 }, - { STB0899_POWERI , 0x3b }, - { STB0899_POWERQ , 0x3d }, - { STB0899_RCOMP , 0x81 }, - { STB0899_AGCIQIN , 0x80 }, - { STB0899_AGC2I1 , 0x04 }, - { STB0899_AGC2I2 , 0xf5 }, - { STB0899_TLIR , 0x25 }, - { STB0899_RTF , 0x80 }, - { STB0899_DSTATUS , 0x00 }, - { STB0899_LDI , 0xca }, - { STB0899_CFRM , 0xf1 }, - { STB0899_CFRL , 0xf3 }, - { STB0899_NIRM , 0x2a }, - { STB0899_NIRL , 0x05 }, - { STB0899_ISYMB , 0x17 }, - { STB0899_QSYMB , 0xfa }, - { STB0899_SFRH , 0x2f }, - { STB0899_SFRM , 0x68 }, - { STB0899_SFRL , 0x40 }, - { STB0899_SFRUPH , 0x2f }, - { STB0899_SFRUPM , 0x68 }, - { STB0899_SFRUPL , 0x40 }, - { STB0899_EQUAI1 , 0xfd }, - { STB0899_EQUAQ1 , 0x04 }, - { STB0899_EQUAI2 , 0x0f }, - { STB0899_EQUAQ2 , 0xff }, - { STB0899_EQUAI3 , 0xdf }, - { STB0899_EQUAQ3 , 0xfa }, - { STB0899_EQUAI4 , 0x37 }, - { STB0899_EQUAQ4 , 0x0d }, - { STB0899_EQUAI5 , 0xbd }, - { STB0899_EQUAQ5 , 0xf7 }, - { STB0899_DSTATUS2 , 0x00 }, - { STB0899_VSTATUS , 0x00 }, - { STB0899_VERROR , 0xff }, - { STB0899_IQSWAP , 0x2a }, - { STB0899_ECNT1M , 0x00 }, - { STB0899_ECNT1L , 0x00 }, - { STB0899_ECNT2M , 0x00 }, - { STB0899_ECNT2L , 0x00 }, - { STB0899_ECNT3M , 0x00 }, - { STB0899_ECNT3L , 0x00 }, - { STB0899_FECAUTO1 , 0x06 }, - { STB0899_FECM , 0x01 }, - { STB0899_VTH12 , 0xf0 }, - { STB0899_VTH23 , 0xa0 }, - { STB0899_VTH34 , 0x78 }, - { STB0899_VTH56 , 0x4e }, - { STB0899_VTH67 , 0x48 }, - { STB0899_VTH78 , 0x38 }, - { STB0899_PRVIT , 0xff }, - { STB0899_VITSYNC , 0x19 }, - { STB0899_RSULC , 0xb1 }, /* DVB = 0xb1, DSS = 0xa1 */ - { STB0899_TSULC , 0x42 }, - { STB0899_RSLLC , 0x40 }, - { STB0899_TSLPL , 0x12 }, - { STB0899_TSCFGH , 0x0c }, - { STB0899_TSCFGM , 0x00 }, - { STB0899_TSCFGL , 0x0c }, - { STB0899_TSOUT , 0x4d }, /* 0x0d for CAM */ - { STB0899_RSSYNCDEL , 0x00 }, - { STB0899_TSINHDELH , 0x02 }, - { STB0899_TSINHDELM , 0x00 }, - { STB0899_TSINHDELL , 0x00 }, - { STB0899_TSLLSTKM , 0x00 }, - { STB0899_TSLLSTKL , 0x00 }, - { STB0899_TSULSTKM , 0x00 }, - { STB0899_TSULSTKL , 0xab }, - { STB0899_PCKLENUL , 0x00 }, - { STB0899_PCKLENLL , 0xcc }, - { STB0899_RSPCKLEN , 0xcc }, - { STB0899_TSSTATUS , 0x80 }, - { STB0899_ERRCTRL1 , 0xb6 }, - { STB0899_ERRCTRL2 , 0x96 }, - { STB0899_ERRCTRL3 , 0x89 }, - { STB0899_DMONMSK1 , 0x27 }, - { STB0899_DMONMSK0 , 0x03 }, - { STB0899_DEMAPVIT , 0x5c }, - { STB0899_PLPARM , 0x1f }, - { STB0899_PDELCTRL , 0x48 }, - { STB0899_PDELCTRL2 , 0x00 }, - { STB0899_BBHCTRL1 , 0x00 }, - { STB0899_BBHCTRL2 , 0x00 }, - { STB0899_HYSTTHRESH , 0x77 }, - { STB0899_MATCSTM , 0x00 }, - { STB0899_MATCSTL , 0x00 }, - { STB0899_UPLCSTM , 0x00 }, - { STB0899_UPLCSTL , 0x00 }, - { STB0899_DFLCSTM , 0x00 }, - { STB0899_DFLCSTL , 0x00 }, - { STB0899_SYNCCST , 0x00 }, - { STB0899_SYNCDCSTM , 0x00 }, - { STB0899_SYNCDCSTL , 0x00 }, - { STB0899_ISI_ENTRY , 0x00 }, - { STB0899_ISI_BIT_EN , 0x00 }, - { STB0899_MATSTRM , 0x00 }, - { STB0899_MATSTRL , 0x00 }, - { STB0899_UPLSTRM , 0x00 }, - { STB0899_UPLSTRL , 0x00 }, - { STB0899_DFLSTRM , 0x00 }, - { STB0899_DFLSTRL , 0x00 }, - { STB0899_SYNCSTR , 0x00 }, - { STB0899_SYNCDSTRM , 0x00 }, - { STB0899_SYNCDSTRL , 0x00 }, - { STB0899_CFGPDELSTATUS1 , 0x10 }, - { STB0899_CFGPDELSTATUS2 , 0x00 }, - { STB0899_BBFERRORM , 0x00 }, - { STB0899_BBFERRORL , 0x00 }, - { STB0899_UPKTERRORM , 0x00 }, - { STB0899_UPKTERRORL , 0x00 }, - { 0xffff , 0xff }, + { STB0899_DEMOD, 0x00 }, + { STB0899_RCOMPC, 0xc9 }, + { STB0899_AGC1CN, 0x41 }, + { STB0899_AGC1REF, 0x08 }, + { STB0899_RTC, 0x7a }, + { STB0899_TMGCFG, 0x4e }, + { STB0899_AGC2REF, 0x33 }, + { STB0899_TLSR, 0x84 }, + { STB0899_CFD, 0xee }, + { STB0899_ACLC, 0x87 }, + { STB0899_BCLC, 0x94 }, + { STB0899_EQON, 0x41 }, + { STB0899_LDT, 0xdd }, + { STB0899_LDT2, 0xc9 }, + { STB0899_EQUALREF, 0xb4 }, + { STB0899_TMGRAMP, 0x10 }, + { STB0899_TMGTHD, 0x30 }, + { STB0899_IDCCOMP, 0xfb }, + { STB0899_QDCCOMP, 0x03 }, + { STB0899_POWERI, 0x3b }, + { STB0899_POWERQ, 0x3d }, + { STB0899_RCOMP, 0x81 }, + { STB0899_AGCIQIN, 0x80 }, + { STB0899_AGC2I1, 0x04 }, + { STB0899_AGC2I2, 0xf5 }, + { STB0899_TLIR, 0x25 }, + { STB0899_RTF, 0x80 }, + { STB0899_DSTATUS, 0x00 }, + { STB0899_LDI, 0xca }, + { STB0899_CFRM, 0xf1 }, + { STB0899_CFRL, 0xf3 }, + { STB0899_NIRM, 0x2a }, + { STB0899_NIRL, 0x05 }, + { STB0899_ISYMB, 0x17 }, + { STB0899_QSYMB, 0xfa }, + { STB0899_SFRH, 0x2f }, + { STB0899_SFRM, 0x68 }, + { STB0899_SFRL, 0x40 }, + { STB0899_SFRUPH, 0x2f }, + { STB0899_SFRUPM, 0x68 }, + { STB0899_SFRUPL, 0x40 }, + { STB0899_EQUAI1, 0xfd }, + { STB0899_EQUAQ1, 0x04 }, + { STB0899_EQUAI2, 0x0f }, + { STB0899_EQUAQ2, 0xff }, + { STB0899_EQUAI3, 0xdf }, + { STB0899_EQUAQ3, 0xfa }, + { STB0899_EQUAI4, 0x37 }, + { STB0899_EQUAQ4, 0x0d }, + { STB0899_EQUAI5, 0xbd }, + { STB0899_EQUAQ5, 0xf7 }, + { STB0899_DSTATUS2, 0x00 }, + { STB0899_VSTATUS, 0x00 }, + { STB0899_VERROR, 0xff }, + { STB0899_IQSWAP, 0x2a }, + { STB0899_ECNT1M, 0x00 }, + { STB0899_ECNT1L, 0x00 }, + { STB0899_ECNT2M, 0x00 }, + { STB0899_ECNT2L, 0x00 }, + { STB0899_ECNT3M, 0x00 }, + { STB0899_ECNT3L, 0x00 }, + { STB0899_FECAUTO1, 0x06 }, + { STB0899_FECM, 0x01 }, + { STB0899_VTH12, 0xf0 }, + { STB0899_VTH23, 0xa0 }, + { STB0899_VTH34, 0x78 }, + { STB0899_VTH56, 0x4e }, + { STB0899_VTH67, 0x48 }, + { STB0899_VTH78, 0x38 }, + { STB0899_PRVIT, 0xff }, + { STB0899_VITSYNC, 0x19 }, + { STB0899_RSULC, 0xb1 }, /* DVB = 0xb1, DSS = 0xa1 */ + { STB0899_TSULC, 0x42 }, + { STB0899_RSLLC, 0x40 }, + { STB0899_TSLPL, 0x12 }, + { STB0899_TSCFGH, 0x0c }, + { STB0899_TSCFGM, 0x00 }, + { STB0899_TSCFGL, 0x0c }, + { STB0899_TSOUT, 0x4d }, /* 0x0d for CAM */ + { STB0899_RSSYNCDEL, 0x00 }, + { STB0899_TSINHDELH, 0x02 }, + { STB0899_TSINHDELM, 0x00 }, + { STB0899_TSINHDELL, 0x00 }, + { STB0899_TSLLSTKM, 0x00 }, + { STB0899_TSLLSTKL, 0x00 }, + { STB0899_TSULSTKM, 0x00 }, + { STB0899_TSULSTKL, 0xab }, + { STB0899_PCKLENUL, 0x00 }, + { STB0899_PCKLENLL, 0xcc }, + { STB0899_RSPCKLEN, 0xcc }, + { STB0899_TSSTATUS, 0x80 }, + { STB0899_ERRCTRL1, 0xb6 }, + { STB0899_ERRCTRL2, 0x96 }, + { STB0899_ERRCTRL3, 0x89 }, + { STB0899_DMONMSK1, 0x27 }, + { STB0899_DMONMSK0, 0x03 }, + { STB0899_DEMAPVIT, 0x5c }, + { STB0899_PLPARM, 0x1f }, + { STB0899_PDELCTRL, 0x48 }, + { STB0899_PDELCTRL2, 0x00 }, + { STB0899_BBHCTRL1, 0x00 }, + { STB0899_BBHCTRL2, 0x00 }, + { STB0899_HYSTTHRESH, 0x77 }, + { STB0899_MATCSTM, 0x00 }, + { STB0899_MATCSTL, 0x00 }, + { STB0899_UPLCSTM, 0x00 }, + { STB0899_UPLCSTL, 0x00 }, + { STB0899_DFLCSTM, 0x00 }, + { STB0899_DFLCSTL, 0x00 }, + { STB0899_SYNCCST, 0x00 }, + { STB0899_SYNCDCSTM, 0x00 }, + { STB0899_SYNCDCSTL, 0x00 }, + { STB0899_ISI_ENTRY, 0x00 }, + { STB0899_ISI_BIT_EN, 0x00 }, + { STB0899_MATSTRM, 0x00 }, + { STB0899_MATSTRL, 0x00 }, + { STB0899_UPLSTRM, 0x00 }, + { STB0899_UPLSTRL, 0x00 }, + { STB0899_DFLSTRM, 0x00 }, + { STB0899_DFLSTRL, 0x00 }, + { STB0899_SYNCSTR, 0x00 }, + { STB0899_SYNCDSTRM, 0x00 }, + { STB0899_SYNCDSTRL, 0x00 }, + { STB0899_CFGPDELSTATUS1, 0x10 }, + { STB0899_CFGPDELSTATUS2, 0x00 }, + { STB0899_BBFERRORM, 0x00 }, + { STB0899_BBFERRORL, 0x00 }, + { STB0899_UPKTERRORM, 0x00 }, + { STB0899_UPKTERRORL, 0x00 }, + { 0xffff, 0xff }, }; /* STB0899 demodulator config for the KNC1 and clones */ @@ -1207,16 +1207,16 @@ static void frontend_init(struct budget_av *budget_av) /* additional setup necessary for the PLUS cards */ switch (saa->pci->subsystem_device) { - case SUBID_DVBS_KNC1_PLUS: - case SUBID_DVBC_KNC1_PLUS: - case SUBID_DVBT_KNC1_PLUS: - case SUBID_DVBC_EASYWATCH: - case SUBID_DVBC_KNC1_PLUS_MK3: - case SUBID_DVBS2_KNC1: - case SUBID_DVBS2_KNC1_OEM: - case SUBID_DVBS2_EASYWATCH: - saa7146_setgpio(saa, 3, SAA7146_GPIO_OUTHI); - break; + case SUBID_DVBS_KNC1_PLUS: + case SUBID_DVBC_KNC1_PLUS: + case SUBID_DVBT_KNC1_PLUS: + case SUBID_DVBC_EASYWATCH: + case SUBID_DVBC_KNC1_PLUS_MK3: + case SUBID_DVBS2_KNC1: + case SUBID_DVBS2_KNC1_OEM: + case SUBID_DVBS2_EASYWATCH: + saa7146_setgpio(saa, 3, SAA7146_GPIO_OUTHI); + break; } switch (saa->pci->subsystem_device) { @@ -1510,15 +1510,15 @@ static int budget_av_attach(struct saa7146_dev *dev, struct saa7146_pci_extensio } static struct saa7146_standard standard[] = { - {.name = "PAL",.id = V4L2_STD_PAL, - .v_offset = 0x17,.v_field = 288, - .h_offset = 0x14,.h_pixels = 680, - .v_max_out = 576,.h_max_out = 768 }, - - {.name = "NTSC",.id = V4L2_STD_NTSC, - .v_offset = 0x16,.v_field = 240, - .h_offset = 0x06,.h_pixels = 708, - .v_max_out = 480,.h_max_out = 640, }, + {.name = "PAL", .id = V4L2_STD_PAL, + .v_offset = 0x17, .v_field = 288, + .h_offset = 0x14, .h_pixels = 680, + .v_max_out = 576, .h_max_out = 768 }, + + {.name = "NTSC", .id = V4L2_STD_NTSC, + .v_offset = 0x16, .v_field = 240, + .h_offset = 0x06, .h_pixels = 708, + .v_max_out = 480, .h_max_out = 640, }, }; static struct saa7146_ext_vv vv_data = { diff --git a/drivers/media/pci/ttpci/budget-ci.c b/drivers/media/pci/ttpci/budget-ci.c index 569e8915a..2859b8ab8 100644 --- a/drivers/media/pci/ttpci/budget-ci.c +++ b/drivers/media/pci/ttpci/budget-ci.c @@ -1035,222 +1035,222 @@ static struct tda827x_config tda827x_config = { /* TT S2-3200 DVB-S (STB0899) Inittab */ static const struct stb0899_s1_reg tt3200_stb0899_s1_init_1[] = { - { STB0899_DEV_ID , 0x81 }, - { STB0899_DISCNTRL1 , 0x32 }, - { STB0899_DISCNTRL2 , 0x80 }, - { STB0899_DISRX_ST0 , 0x04 }, - { STB0899_DISRX_ST1 , 0x00 }, - { STB0899_DISPARITY , 0x00 }, - { STB0899_DISSTATUS , 0x20 }, - { STB0899_DISF22 , 0x8c }, - { STB0899_DISF22RX , 0x9a }, - { STB0899_SYSREG , 0x0b }, - { STB0899_ACRPRESC , 0x11 }, - { STB0899_ACRDIV1 , 0x0a }, - { STB0899_ACRDIV2 , 0x05 }, - { STB0899_DACR1 , 0x00 }, - { STB0899_DACR2 , 0x00 }, - { STB0899_OUTCFG , 0x00 }, - { STB0899_MODECFG , 0x00 }, - { STB0899_IRQSTATUS_3 , 0x30 }, - { STB0899_IRQSTATUS_2 , 0x00 }, - { STB0899_IRQSTATUS_1 , 0x00 }, - { STB0899_IRQSTATUS_0 , 0x00 }, - { STB0899_IRQMSK_3 , 0xf3 }, - { STB0899_IRQMSK_2 , 0xfc }, - { STB0899_IRQMSK_1 , 0xff }, - { STB0899_IRQMSK_0 , 0xff }, - { STB0899_IRQCFG , 0x00 }, - { STB0899_I2CCFG , 0x88 }, - { STB0899_I2CRPT , 0x48 }, /* 12k Pullup, Repeater=16, Stop=disabled */ - { STB0899_IOPVALUE5 , 0x00 }, - { STB0899_IOPVALUE4 , 0x20 }, - { STB0899_IOPVALUE3 , 0xc9 }, - { STB0899_IOPVALUE2 , 0x90 }, - { STB0899_IOPVALUE1 , 0x40 }, - { STB0899_IOPVALUE0 , 0x00 }, - { STB0899_GPIO00CFG , 0x82 }, - { STB0899_GPIO01CFG , 0x82 }, - { STB0899_GPIO02CFG , 0x82 }, - { STB0899_GPIO03CFG , 0x82 }, - { STB0899_GPIO04CFG , 0x82 }, - { STB0899_GPIO05CFG , 0x82 }, - { STB0899_GPIO06CFG , 0x82 }, - { STB0899_GPIO07CFG , 0x82 }, - { STB0899_GPIO08CFG , 0x82 }, - { STB0899_GPIO09CFG , 0x82 }, - { STB0899_GPIO10CFG , 0x82 }, - { STB0899_GPIO11CFG , 0x82 }, - { STB0899_GPIO12CFG , 0x82 }, - { STB0899_GPIO13CFG , 0x82 }, - { STB0899_GPIO14CFG , 0x82 }, - { STB0899_GPIO15CFG , 0x82 }, - { STB0899_GPIO16CFG , 0x82 }, - { STB0899_GPIO17CFG , 0x82 }, - { STB0899_GPIO18CFG , 0x82 }, - { STB0899_GPIO19CFG , 0x82 }, - { STB0899_GPIO20CFG , 0x82 }, - { STB0899_SDATCFG , 0xb8 }, - { STB0899_SCLTCFG , 0xba }, - { STB0899_AGCRFCFG , 0x1c }, /* 0x11 */ - { STB0899_GPIO22 , 0x82 }, /* AGCBB2CFG */ - { STB0899_GPIO21 , 0x91 }, /* AGCBB1CFG */ - { STB0899_DIRCLKCFG , 0x82 }, - { STB0899_CLKOUT27CFG , 0x7e }, - { STB0899_STDBYCFG , 0x82 }, - { STB0899_CS0CFG , 0x82 }, - { STB0899_CS1CFG , 0x82 }, - { STB0899_DISEQCOCFG , 0x20 }, - { STB0899_GPIO32CFG , 0x82 }, - { STB0899_GPIO33CFG , 0x82 }, - { STB0899_GPIO34CFG , 0x82 }, - { STB0899_GPIO35CFG , 0x82 }, - { STB0899_GPIO36CFG , 0x82 }, - { STB0899_GPIO37CFG , 0x82 }, - { STB0899_GPIO38CFG , 0x82 }, - { STB0899_GPIO39CFG , 0x82 }, - { STB0899_NCOARSE , 0x15 }, /* 0x15 = 27 Mhz Clock, F/3 = 198MHz, F/6 = 99MHz */ - { STB0899_SYNTCTRL , 0x02 }, /* 0x00 = CLK from CLKI, 0x02 = CLK from XTALI */ - { STB0899_FILTCTRL , 0x00 }, - { STB0899_SYSCTRL , 0x00 }, - { STB0899_STOPCLK1 , 0x20 }, - { STB0899_STOPCLK2 , 0x00 }, - { STB0899_INTBUFSTATUS , 0x00 }, - { STB0899_INTBUFCTRL , 0x0a }, - { 0xffff , 0xff }, + { STB0899_DEV_ID, 0x81 }, + { STB0899_DISCNTRL1, 0x32 }, + { STB0899_DISCNTRL2, 0x80 }, + { STB0899_DISRX_ST0, 0x04 }, + { STB0899_DISRX_ST1, 0x00 }, + { STB0899_DISPARITY, 0x00 }, + { STB0899_DISSTATUS, 0x20 }, + { STB0899_DISF22, 0x8c }, + { STB0899_DISF22RX, 0x9a }, + { STB0899_SYSREG, 0x0b }, + { STB0899_ACRPRESC, 0x11 }, + { STB0899_ACRDIV1, 0x0a }, + { STB0899_ACRDIV2, 0x05 }, + { STB0899_DACR1, 0x00 }, + { STB0899_DACR2, 0x00 }, + { STB0899_OUTCFG, 0x00 }, + { STB0899_MODECFG, 0x00 }, + { STB0899_IRQSTATUS_3, 0x30 }, + { STB0899_IRQSTATUS_2, 0x00 }, + { STB0899_IRQSTATUS_1, 0x00 }, + { STB0899_IRQSTATUS_0, 0x00 }, + { STB0899_IRQMSK_3, 0xf3 }, + { STB0899_IRQMSK_2, 0xfc }, + { STB0899_IRQMSK_1, 0xff }, + { STB0899_IRQMSK_0, 0xff }, + { STB0899_IRQCFG, 0x00 }, + { STB0899_I2CCFG, 0x88 }, + { STB0899_I2CRPT, 0x48 }, /* 12k Pullup, Repeater=16, Stop=disabled */ + { STB0899_IOPVALUE5, 0x00 }, + { STB0899_IOPVALUE4, 0x20 }, + { STB0899_IOPVALUE3, 0xc9 }, + { STB0899_IOPVALUE2, 0x90 }, + { STB0899_IOPVALUE1, 0x40 }, + { STB0899_IOPVALUE0, 0x00 }, + { STB0899_GPIO00CFG, 0x82 }, + { STB0899_GPIO01CFG, 0x82 }, + { STB0899_GPIO02CFG, 0x82 }, + { STB0899_GPIO03CFG, 0x82 }, + { STB0899_GPIO04CFG, 0x82 }, + { STB0899_GPIO05CFG, 0x82 }, + { STB0899_GPIO06CFG, 0x82 }, + { STB0899_GPIO07CFG, 0x82 }, + { STB0899_GPIO08CFG, 0x82 }, + { STB0899_GPIO09CFG, 0x82 }, + { STB0899_GPIO10CFG, 0x82 }, + { STB0899_GPIO11CFG, 0x82 }, + { STB0899_GPIO12CFG, 0x82 }, + { STB0899_GPIO13CFG, 0x82 }, + { STB0899_GPIO14CFG, 0x82 }, + { STB0899_GPIO15CFG, 0x82 }, + { STB0899_GPIO16CFG, 0x82 }, + { STB0899_GPIO17CFG, 0x82 }, + { STB0899_GPIO18CFG, 0x82 }, + { STB0899_GPIO19CFG, 0x82 }, + { STB0899_GPIO20CFG, 0x82 }, + { STB0899_SDATCFG, 0xb8 }, + { STB0899_SCLTCFG, 0xba }, + { STB0899_AGCRFCFG, 0x1c }, /* 0x11 */ + { STB0899_GPIO22, 0x82 }, /* AGCBB2CFG */ + { STB0899_GPIO21, 0x91 }, /* AGCBB1CFG */ + { STB0899_DIRCLKCFG, 0x82 }, + { STB0899_CLKOUT27CFG, 0x7e }, + { STB0899_STDBYCFG, 0x82 }, + { STB0899_CS0CFG, 0x82 }, + { STB0899_CS1CFG, 0x82 }, + { STB0899_DISEQCOCFG, 0x20 }, + { STB0899_GPIO32CFG, 0x82 }, + { STB0899_GPIO33CFG, 0x82 }, + { STB0899_GPIO34CFG, 0x82 }, + { STB0899_GPIO35CFG, 0x82 }, + { STB0899_GPIO36CFG, 0x82 }, + { STB0899_GPIO37CFG, 0x82 }, + { STB0899_GPIO38CFG, 0x82 }, + { STB0899_GPIO39CFG, 0x82 }, + { STB0899_NCOARSE, 0x15 }, /* 0x15 = 27 Mhz Clock, F/3 = 198MHz, F/6 = 99MHz */ + { STB0899_SYNTCTRL, 0x02 }, /* 0x00 = CLK from CLKI, 0x02 = CLK from XTALI */ + { STB0899_FILTCTRL, 0x00 }, + { STB0899_SYSCTRL, 0x00 }, + { STB0899_STOPCLK1, 0x20 }, + { STB0899_STOPCLK2, 0x00 }, + { STB0899_INTBUFSTATUS, 0x00 }, + { STB0899_INTBUFCTRL, 0x0a }, + { 0xffff, 0xff }, }; static const struct stb0899_s1_reg tt3200_stb0899_s1_init_3[] = { - { STB0899_DEMOD , 0x00 }, - { STB0899_RCOMPC , 0xc9 }, - { STB0899_AGC1CN , 0x41 }, - { STB0899_AGC1REF , 0x10 }, - { STB0899_RTC , 0x7a }, - { STB0899_TMGCFG , 0x4e }, - { STB0899_AGC2REF , 0x34 }, - { STB0899_TLSR , 0x84 }, - { STB0899_CFD , 0xc7 }, - { STB0899_ACLC , 0x87 }, - { STB0899_BCLC , 0x94 }, - { STB0899_EQON , 0x41 }, - { STB0899_LDT , 0xdd }, - { STB0899_LDT2 , 0xc9 }, - { STB0899_EQUALREF , 0xb4 }, - { STB0899_TMGRAMP , 0x10 }, - { STB0899_TMGTHD , 0x30 }, - { STB0899_IDCCOMP , 0xfb }, - { STB0899_QDCCOMP , 0x03 }, - { STB0899_POWERI , 0x3b }, - { STB0899_POWERQ , 0x3d }, - { STB0899_RCOMP , 0x81 }, - { STB0899_AGCIQIN , 0x80 }, - { STB0899_AGC2I1 , 0x04 }, - { STB0899_AGC2I2 , 0xf5 }, - { STB0899_TLIR , 0x25 }, - { STB0899_RTF , 0x80 }, - { STB0899_DSTATUS , 0x00 }, - { STB0899_LDI , 0xca }, - { STB0899_CFRM , 0xf1 }, - { STB0899_CFRL , 0xf3 }, - { STB0899_NIRM , 0x2a }, - { STB0899_NIRL , 0x05 }, - { STB0899_ISYMB , 0x17 }, - { STB0899_QSYMB , 0xfa }, - { STB0899_SFRH , 0x2f }, - { STB0899_SFRM , 0x68 }, - { STB0899_SFRL , 0x40 }, - { STB0899_SFRUPH , 0x2f }, - { STB0899_SFRUPM , 0x68 }, - { STB0899_SFRUPL , 0x40 }, - { STB0899_EQUAI1 , 0xfd }, - { STB0899_EQUAQ1 , 0x04 }, - { STB0899_EQUAI2 , 0x0f }, - { STB0899_EQUAQ2 , 0xff }, - { STB0899_EQUAI3 , 0xdf }, - { STB0899_EQUAQ3 , 0xfa }, - { STB0899_EQUAI4 , 0x37 }, - { STB0899_EQUAQ4 , 0x0d }, - { STB0899_EQUAI5 , 0xbd }, - { STB0899_EQUAQ5 , 0xf7 }, - { STB0899_DSTATUS2 , 0x00 }, - { STB0899_VSTATUS , 0x00 }, - { STB0899_VERROR , 0xff }, - { STB0899_IQSWAP , 0x2a }, - { STB0899_ECNT1M , 0x00 }, - { STB0899_ECNT1L , 0x00 }, - { STB0899_ECNT2M , 0x00 }, - { STB0899_ECNT2L , 0x00 }, - { STB0899_ECNT3M , 0x00 }, - { STB0899_ECNT3L , 0x00 }, - { STB0899_FECAUTO1 , 0x06 }, - { STB0899_FECM , 0x01 }, - { STB0899_VTH12 , 0xf0 }, - { STB0899_VTH23 , 0xa0 }, - { STB0899_VTH34 , 0x78 }, - { STB0899_VTH56 , 0x4e }, - { STB0899_VTH67 , 0x48 }, - { STB0899_VTH78 , 0x38 }, - { STB0899_PRVIT , 0xff }, - { STB0899_VITSYNC , 0x19 }, - { STB0899_RSULC , 0xb1 }, /* DVB = 0xb1, DSS = 0xa1 */ - { STB0899_TSULC , 0x42 }, - { STB0899_RSLLC , 0x40 }, - { STB0899_TSLPL , 0x12 }, - { STB0899_TSCFGH , 0x0c }, - { STB0899_TSCFGM , 0x00 }, - { STB0899_TSCFGL , 0x0c }, - { STB0899_TSOUT , 0x4d }, /* 0x0d for CAM */ - { STB0899_RSSYNCDEL , 0x00 }, - { STB0899_TSINHDELH , 0x02 }, - { STB0899_TSINHDELM , 0x00 }, - { STB0899_TSINHDELL , 0x00 }, - { STB0899_TSLLSTKM , 0x00 }, - { STB0899_TSLLSTKL , 0x00 }, - { STB0899_TSULSTKM , 0x00 }, - { STB0899_TSULSTKL , 0xab }, - { STB0899_PCKLENUL , 0x00 }, - { STB0899_PCKLENLL , 0xcc }, - { STB0899_RSPCKLEN , 0xcc }, - { STB0899_TSSTATUS , 0x80 }, - { STB0899_ERRCTRL1 , 0xb6 }, - { STB0899_ERRCTRL2 , 0x96 }, - { STB0899_ERRCTRL3 , 0x89 }, - { STB0899_DMONMSK1 , 0x27 }, - { STB0899_DMONMSK0 , 0x03 }, - { STB0899_DEMAPVIT , 0x5c }, - { STB0899_PLPARM , 0x1f }, - { STB0899_PDELCTRL , 0x48 }, - { STB0899_PDELCTRL2 , 0x00 }, - { STB0899_BBHCTRL1 , 0x00 }, - { STB0899_BBHCTRL2 , 0x00 }, - { STB0899_HYSTTHRESH , 0x77 }, - { STB0899_MATCSTM , 0x00 }, - { STB0899_MATCSTL , 0x00 }, - { STB0899_UPLCSTM , 0x00 }, - { STB0899_UPLCSTL , 0x00 }, - { STB0899_DFLCSTM , 0x00 }, - { STB0899_DFLCSTL , 0x00 }, - { STB0899_SYNCCST , 0x00 }, - { STB0899_SYNCDCSTM , 0x00 }, - { STB0899_SYNCDCSTL , 0x00 }, - { STB0899_ISI_ENTRY , 0x00 }, - { STB0899_ISI_BIT_EN , 0x00 }, - { STB0899_MATSTRM , 0x00 }, - { STB0899_MATSTRL , 0x00 }, - { STB0899_UPLSTRM , 0x00 }, - { STB0899_UPLSTRL , 0x00 }, - { STB0899_DFLSTRM , 0x00 }, - { STB0899_DFLSTRL , 0x00 }, - { STB0899_SYNCSTR , 0x00 }, - { STB0899_SYNCDSTRM , 0x00 }, - { STB0899_SYNCDSTRL , 0x00 }, - { STB0899_CFGPDELSTATUS1 , 0x10 }, - { STB0899_CFGPDELSTATUS2 , 0x00 }, - { STB0899_BBFERRORM , 0x00 }, - { STB0899_BBFERRORL , 0x00 }, - { STB0899_UPKTERRORM , 0x00 }, - { STB0899_UPKTERRORL , 0x00 }, - { 0xffff , 0xff }, + { STB0899_DEMOD, 0x00 }, + { STB0899_RCOMPC, 0xc9 }, + { STB0899_AGC1CN, 0x41 }, + { STB0899_AGC1REF, 0x10 }, + { STB0899_RTC, 0x7a }, + { STB0899_TMGCFG, 0x4e }, + { STB0899_AGC2REF, 0x34 }, + { STB0899_TLSR, 0x84 }, + { STB0899_CFD, 0xc7 }, + { STB0899_ACLC, 0x87 }, + { STB0899_BCLC, 0x94 }, + { STB0899_EQON, 0x41 }, + { STB0899_LDT, 0xdd }, + { STB0899_LDT2, 0xc9 }, + { STB0899_EQUALREF, 0xb4 }, + { STB0899_TMGRAMP, 0x10 }, + { STB0899_TMGTHD, 0x30 }, + { STB0899_IDCCOMP, 0xfb }, + { STB0899_QDCCOMP, 0x03 }, + { STB0899_POWERI, 0x3b }, + { STB0899_POWERQ, 0x3d }, + { STB0899_RCOMP, 0x81 }, + { STB0899_AGCIQIN, 0x80 }, + { STB0899_AGC2I1, 0x04 }, + { STB0899_AGC2I2, 0xf5 }, + { STB0899_TLIR, 0x25 }, + { STB0899_RTF, 0x80 }, + { STB0899_DSTATUS, 0x00 }, + { STB0899_LDI, 0xca }, + { STB0899_CFRM, 0xf1 }, + { STB0899_CFRL, 0xf3 }, + { STB0899_NIRM, 0x2a }, + { STB0899_NIRL, 0x05 }, + { STB0899_ISYMB, 0x17 }, + { STB0899_QSYMB, 0xfa }, + { STB0899_SFRH, 0x2f }, + { STB0899_SFRM, 0x68 }, + { STB0899_SFRL, 0x40 }, + { STB0899_SFRUPH, 0x2f }, + { STB0899_SFRUPM, 0x68 }, + { STB0899_SFRUPL, 0x40 }, + { STB0899_EQUAI1, 0xfd }, + { STB0899_EQUAQ1, 0x04 }, + { STB0899_EQUAI2, 0x0f }, + { STB0899_EQUAQ2, 0xff }, + { STB0899_EQUAI3, 0xdf }, + { STB0899_EQUAQ3, 0xfa }, + { STB0899_EQUAI4, 0x37 }, + { STB0899_EQUAQ4, 0x0d }, + { STB0899_EQUAI5, 0xbd }, + { STB0899_EQUAQ5, 0xf7 }, + { STB0899_DSTATUS2, 0x00 }, + { STB0899_VSTATUS, 0x00 }, + { STB0899_VERROR, 0xff }, + { STB0899_IQSWAP, 0x2a }, + { STB0899_ECNT1M, 0x00 }, + { STB0899_ECNT1L, 0x00 }, + { STB0899_ECNT2M, 0x00 }, + { STB0899_ECNT2L, 0x00 }, + { STB0899_ECNT3M, 0x00 }, + { STB0899_ECNT3L, 0x00 }, + { STB0899_FECAUTO1, 0x06 }, + { STB0899_FECM, 0x01 }, + { STB0899_VTH12, 0xf0 }, + { STB0899_VTH23, 0xa0 }, + { STB0899_VTH34, 0x78 }, + { STB0899_VTH56, 0x4e }, + { STB0899_VTH67, 0x48 }, + { STB0899_VTH78, 0x38 }, + { STB0899_PRVIT, 0xff }, + { STB0899_VITSYNC, 0x19 }, + { STB0899_RSULC, 0xb1 }, /* DVB = 0xb1, DSS = 0xa1 */ + { STB0899_TSULC, 0x42 }, + { STB0899_RSLLC, 0x40 }, + { STB0899_TSLPL, 0x12 }, + { STB0899_TSCFGH, 0x0c }, + { STB0899_TSCFGM, 0x00 }, + { STB0899_TSCFGL, 0x0c }, + { STB0899_TSOUT, 0x4d }, /* 0x0d for CAM */ + { STB0899_RSSYNCDEL, 0x00 }, + { STB0899_TSINHDELH, 0x02 }, + { STB0899_TSINHDELM, 0x00 }, + { STB0899_TSINHDELL, 0x00 }, + { STB0899_TSLLSTKM, 0x00 }, + { STB0899_TSLLSTKL, 0x00 }, + { STB0899_TSULSTKM, 0x00 }, + { STB0899_TSULSTKL, 0xab }, + { STB0899_PCKLENUL, 0x00 }, + { STB0899_PCKLENLL, 0xcc }, + { STB0899_RSPCKLEN, 0xcc }, + { STB0899_TSSTATUS, 0x80 }, + { STB0899_ERRCTRL1, 0xb6 }, + { STB0899_ERRCTRL2, 0x96 }, + { STB0899_ERRCTRL3, 0x89 }, + { STB0899_DMONMSK1, 0x27 }, + { STB0899_DMONMSK0, 0x03 }, + { STB0899_DEMAPVIT, 0x5c }, + { STB0899_PLPARM, 0x1f }, + { STB0899_PDELCTRL, 0x48 }, + { STB0899_PDELCTRL2, 0x00 }, + { STB0899_BBHCTRL1, 0x00 }, + { STB0899_BBHCTRL2, 0x00 }, + { STB0899_HYSTTHRESH, 0x77 }, + { STB0899_MATCSTM, 0x00 }, + { STB0899_MATCSTL, 0x00 }, + { STB0899_UPLCSTM, 0x00 }, + { STB0899_UPLCSTL, 0x00 }, + { STB0899_DFLCSTM, 0x00 }, + { STB0899_DFLCSTL, 0x00 }, + { STB0899_SYNCCST, 0x00 }, + { STB0899_SYNCDCSTM, 0x00 }, + { STB0899_SYNCDCSTL, 0x00 }, + { STB0899_ISI_ENTRY, 0x00 }, + { STB0899_ISI_BIT_EN, 0x00 }, + { STB0899_MATSTRM, 0x00 }, + { STB0899_MATSTRL, 0x00 }, + { STB0899_UPLSTRM, 0x00 }, + { STB0899_UPLSTRL, 0x00 }, + { STB0899_DFLSTRM, 0x00 }, + { STB0899_DFLSTRL, 0x00 }, + { STB0899_SYNCSTR, 0x00 }, + { STB0899_SYNCDSTRM, 0x00 }, + { STB0899_SYNCDSTRL, 0x00 }, + { STB0899_CFGPDELSTATUS1, 0x10 }, + { STB0899_CFGPDELSTATUS2, 0x00 }, + { STB0899_BBFERRORM, 0x00 }, + { STB0899_BBFERRORL, 0x00 }, + { STB0899_UPKTERRORM, 0x00 }, + { STB0899_UPKTERRORL, 0x00 }, + { 0xffff, 0xff }, }; static struct stb0899_config tt3200_config = { diff --git a/drivers/media/pci/ttpci/budget.c b/drivers/media/pci/ttpci/budget.c index aab94c4d7..faa2a3561 100644 --- a/drivers/media/pci/ttpci/budget.c +++ b/drivers/media/pci/ttpci/budget.c @@ -125,19 +125,19 @@ static int SetVoltage_Activy(struct budget *budget, dprintk(2, "budget: %p\n", budget); switch (voltage) { - case SEC_VOLTAGE_13: - saa7146_setgpio(dev, 1, SAA7146_GPIO_OUTHI); - saa7146_setgpio(dev, 2, SAA7146_GPIO_OUTLO); - break; - case SEC_VOLTAGE_18: - saa7146_setgpio(dev, 1, SAA7146_GPIO_OUTHI); - saa7146_setgpio(dev, 2, SAA7146_GPIO_OUTHI); - break; - case SEC_VOLTAGE_OFF: - saa7146_setgpio(dev, 1, SAA7146_GPIO_OUTLO); - break; - default: - return -EINVAL; + case SEC_VOLTAGE_13: + saa7146_setgpio(dev, 1, SAA7146_GPIO_OUTHI); + saa7146_setgpio(dev, 2, SAA7146_GPIO_OUTLO); + break; + case SEC_VOLTAGE_18: + saa7146_setgpio(dev, 1, SAA7146_GPIO_OUTHI); + saa7146_setgpio(dev, 2, SAA7146_GPIO_OUTHI); + break; + case SEC_VOLTAGE_OFF: + saa7146_setgpio(dev, 1, SAA7146_GPIO_OUTLO); + break; + default: + return -EINVAL; } return 0; From patchwork Mon Apr 15 02:24:04 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Herdler X-Patchwork-Id: 789131 Received: from mout.gmx.net (mout.gmx.net [212.227.15.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 53D84848D for ; Mon, 15 Apr 2024 02:24:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=212.227.15.18 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713147879; cv=none; b=UZUX/c+Zkfw3eDUFP37nbufFg2BnluS6zJVE/VijcsNZbKu1ti6UjebF3+/dAYBbjDJ5kuBIXR7KlupU4PLrlfM49tByJze7f0+K594N4iLrmsOBB3NWpog9IqPkpiadkuPmbMbZMSzr0uYad0KKHMNBuFBGOK1X0HbRdZ9jLQU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713147879; c=relaxed/simple; bh=Vtx4SPw+kf4WnbF4QEd91gh5ktah5wK6WAX0utsmhPQ=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=tCLHtx8Tean9Ztze5Y0eUIg4K1DZxzpFgrdjgeCYZtTlzni5grH6+yFiiIULEvLeA3IfGw14kiOL1H1jgvt7kf8HQnpPhYT/3h9BuDkUr3T36A/m58hYgPxxjJ5yDT/rF/vAM1TUuq4FbW9OYhJ9mJr/4nIBnHkPwtltOEgIAKc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=nurfuerspam.de; spf=pass smtp.mailfrom=nurfuerspam.de; dkim=pass (2048-bit key) header.d=nurfuerspam.de header.i=herdler@nurfuerspam.de header.b=k41ER2Wh; arc=none smtp.client-ip=212.227.15.18 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=nurfuerspam.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=nurfuerspam.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=nurfuerspam.de header.i=herdler@nurfuerspam.de header.b="k41ER2Wh" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nurfuerspam.de; s=s31663417; t=1713147872; x=1713752672; i=herdler@nurfuerspam.de; bh=Uc3+xXW8rR96TkY6gqCE9zzIBx9Ap/E1B02SoMaFhO0=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:Message-Id:In-Reply-To: References:MIME-Version:Content-Transfer-Encoding:cc: content-transfer-encoding:content-type:date:from:message-id: mime-version:reply-to:subject:to; b=k41ER2WhzceitdFZOm72GL9AF9EEExTGLFWzNGYDP25icgsQsJLTkYga5a2eWAV4 Ba7fzkYxfaIMOOgYXisCUKWEzGib9zl3kFZRaHpuUrylrr88OFG8gIbpxg0rPKW42 Za6VOoxIdmy2CShyi/pLdA7HUOzxrkbRn4lz8qkRYSfeYD5aL0TqmWHM6D8IZvXBY AoHqM5RZVQQmtXlYeierugLLAV8evuiMP5LV3/zjE1ZCI3u6Ex9VY3pNU31wsk9NW +vn4PsRi8dQTfUZod+5fh95gDL6+yeQgTjrTDVll4K5epuO3ApiLxjE+JiL71VOLL HlDro3fWzHWwRrXmdA== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from astro.haus ([91.132.223.107]) by mail.gmx.net (mrgmx005 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MA7Ka-1s3Mkc1CfK-00BbMq; Mon, 15 Apr 2024 04:24:32 +0200 From: Stefan Herdler To: hverkuil-cisco@xs4all.nl Cc: linux-media@vger.kernel.org, smoch@web.de, tmn505@gmail.com, vinschen@redhat.com Subject: [PATCH v2 03/10] media: ttpci: coding style fixes: comments Date: Mon, 15 Apr 2024 04:24:04 +0200 Message-Id: <20240415022411.234580-4-herdler@nurfuerspam.de> X-Mailer: git-send-email 2.34.0 In-Reply-To: <20240415022411.234580-1-herdler@nurfuerspam.de> References: <20240415022411.234580-1-herdler@nurfuerspam.de> Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Provags-ID: V03:K1:ZVCHWH0vi0pnOVyjh1v9Nuva7fwxbNeK4oFa7GQJksqm/H/SwMQ 101+Z7T7UcdqvB4oo4OCq/fuNX6P3b57TrLSrTojHUlrg3uM+SNwWyADFOb9xicYEb0G8R4 NUWrqeiBztk6TKXHZJURzVkeg4hIObvzrDfMYQr2H/Zi6p8BjhRGZxdbAUKDSfYknu7i3kH OwvECCec6QMUOk96Yzpgg== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:h2J8Be3V9Mw=;RefS/XqpPHnhwqQu3BmMWZVcg27 eT4k8u1C+40LIfnG/dWXcB5L19MIUFe0gkGqOGdTTPIEDM2ZfgNbyCkPF4t1X3eUo5K6Mh2/2 xtNP532fpYC6ZRGYOOShOEBNxM1IdsISr5K03ovsxc8QWUJohiJJj2Z5x/JjkL0DqmzclnuvZ IZxtPDzAmpKRVhWZSkfNjyTGTt/ptv9IEB823PeelB5GibF2oA9Rvvrlby+Aq/lGMuPsBMzuE c0V0Soptw5udOpzVdLRMG04Wbgv00SosdnIpjJNzVvthcfLxUW9CoSXtJH+xLRB+Z+SZMpX8y gFEqO7cZLRFCHvUm0UeFmu3CVdBN/JJEhsRq6CoZcJSC4vwzOAJHDAg7YriwcNCgW0XeP5ihp UzY8Y1cvanH4+jfzGL7iMc5zsTIXe3MnNYM9TKY/8nCQJGEzBV3kwffidT2rCOxXRjUy1H3+2 JKUx/sVd2poMCaCXLAXry6CmlW11xb72xcCHOqa4zsCQYSsNag7a4kcKj0cnJ1VmfpYiwi6q0 GEy5TEDxXI0GYXDt4RYahMjIw2uAE97+yxEKoZPWhvQQTq0ZRExriy8lyCy36FVbnopbZH9Jb F5GZqKyR7Zh9ZydOkSox6k6mYFVq5vH2uvMXO1BbCoSx/bMSAWNXDVD0EE25McpJ2ozAQMdd+ zQ5GCDkhSL9/gyZj0OA3NH4nVUVoGjToGlYr6uXXfbk3zu2j+bQ/MNvoS2SpxjrYc723UsfMY skQDRFZom2U5AKRz+PN1HCPOlRYP/L58asHLAPGYmywOMU6aD1FvggdAV1uWdQuLPcidAhosB lvtmCDcyiWjrN2xcdKsNuhrsa/s1lznlbOipdjgZtlJEE= This patch fixes the following checkpatch warnings: WARNING:BLOCK_COMMENT_STYLE: Block comments use * on subsequent lines WARNING:BLOCK_COMMENT_STYLE: Block comments use a trailing */ on a separate line WARNING: It's generally not useful to have the filename in the file Signed-off-by: Stefan Herdler --- ========================= Changes since v1 =============================== 1. Title ========================================================================== drivers/media/pci/ttpci/budget-av.c | 20 ++++++++++++-------- drivers/media/pci/ttpci/budget-ci.c | 3 ++- drivers/media/pci/ttpci/budget-core.c | 8 +++++--- drivers/media/pci/ttpci/budget.c | 27 +++++++++++++++++---------- 4 files changed, 36 insertions(+), 22 deletions(-) -- 2.34.0 diff --git a/drivers/media/pci/ttpci/budget-av.c b/drivers/media/pci/ttpci/budget-av.c index b9efcd3cc..dbd4ef40e 100644 --- a/drivers/media/pci/ttpci/budget-av.c +++ b/drivers/media/pci/ttpci/budget-av.c @@ -1,7 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-or-later /* - * budget-av.c: driver for the SAA7146 based Budget DVB cards - * with analog video in + * budget-av.ko: driver for the SAA7146 based Budget DVB cards + * with analog video input (and optionally with CI) * * Compiled from various sources by Michael Hunold * @@ -63,8 +63,8 @@ struct budget_av { static int ciintf_slot_shutdown(struct dvb_ca_en50221 *ca, int slot); - -/* GPIO Connections: +/* + * GPIO Connections: * 0 - Vcc/Reset (Reset is controlled by capacitor). Resets the frontend *AS WELL*! * 1 - CI memory select 0=>IO memory, 1=>Attribute Memory * 2 - CI Card Enable (Active Low) @@ -267,8 +267,10 @@ static int ciintf_poll_slot_status(struct dvb_ca_en50221 *ca, int slot, int open if (slot != 0) return -EINVAL; - /* test the card detect line - needs to be done carefully - * since it never goes high for some CAMs on this interface (e.g. topuptv) */ + /* + * test the card detect line - needs to be done carefully + * since it never goes high for some CAMs on this interface (e.g. topuptv) + */ if (budget_av->slot_status == SLOTSTATUS_NONE) { saa7146_setgpio(saa, 3, SAA7146_GPIO_INPUT); udelay(1); @@ -281,12 +283,14 @@ static int ciintf_poll_slot_status(struct dvb_ca_en50221 *ca, int slot, int open saa7146_setgpio(saa, 3, SAA7146_GPIO_OUTLO); } - /* We also try and read from IO memory to work round the above detection bug. If + /* + * We also try and read from IO memory to work round the above detection bug. If * there is no CAM, we will get a timeout. Only done if there is no cam * present, since this test actually breaks some cams :( * * if the CI interface is not open, we also do the above test since we - * don't care if the cam has problems - we'll be resetting it on open() anyway */ + * don't care if the cam has problems - we'll be resetting it on open() anyway + */ if ((budget_av->slot_status == SLOTSTATUS_NONE) || (!open)) { saa7146_setgpio(budget_av->budget.dev, 1, SAA7146_GPIO_OUTLO); result = ttpci_budget_debiread(&budget_av->budget, DEBICICAM, 0, 1, 0, 1); diff --git a/drivers/media/pci/ttpci/budget-ci.c b/drivers/media/pci/ttpci/budget-ci.c index 2859b8ab8..ebf340417 100644 --- a/drivers/media/pci/ttpci/budget-ci.c +++ b/drivers/media/pci/ttpci/budget-ci.c @@ -1,6 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-or-later /* - * budget-ci.c: driver for the SAA7146 based Budget DVB cards + * budget-ci.ko: driver for the SAA7146 based Budget DVB cards + * with CI (but without analog video input) * * Compiled from various sources by Michael Hunold * diff --git a/drivers/media/pci/ttpci/budget-core.c b/drivers/media/pci/ttpci/budget-core.c index ffa659be1..f41f4eea7 100644 --- a/drivers/media/pci/ttpci/budget-core.c +++ b/drivers/media/pci/ttpci/budget-core.c @@ -1,6 +1,6 @@ // SPDX-License-Identifier: GPL-2.0-or-later /* - * budget-core.c: driver for the SAA7146 based Budget DVB cards + * budget-core.ko: base-driver for the SAA7146 based Budget DVB cards * * Compiled from various sources by Michael Hunold * @@ -491,8 +491,10 @@ int ttpci_budget_init(struct budget *budget, struct saa7146_dev *dev, spin_lock_init(&budget->feedlock); spin_lock_init(&budget->debilock); - /* the Siemens DVB needs this if you want to have the i2c chips - get recognized before the main driver is loaded */ + /* + * the Siemens DVB needs this if you want to have the i2c chips + * get recognized before the main driver is loaded + */ if (bi->type != BUDGET_FS_ACTIVY) saa7146_write(dev, GPIO_CTRL, 0x500000); /* GPIO 3 = 1 */ diff --git a/drivers/media/pci/ttpci/budget.c b/drivers/media/pci/ttpci/budget.c index faa2a3561..9fe087add 100644 --- a/drivers/media/pci/ttpci/budget.c +++ b/drivers/media/pci/ttpci/budget.c @@ -1,6 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-or-later /* - * budget.c: driver for the SAA7146 based Budget DVB cards + * budget.ko: driver for the SAA7146 based Budget DVB cards + * without analog video input or CI * * Compiled from various sources by Michael Hunold * @@ -50,9 +51,11 @@ static void Set22K(struct budget *budget, int state) saa7146_setgpio(dev, 3, (state ? SAA7146_GPIO_OUTHI : SAA7146_GPIO_OUTLO)); } -/* Diseqc functions only for TT Budget card */ -/* taken from the Skyvision DVB driver by - Ralph Metzler */ +/* + * Diseqc functions only for TT Budget card + * taken from the Skyvision DVB driver by + * Ralph Metzler + */ static void DiseqcSendBit(struct budget *budget, int data) { @@ -675,9 +678,11 @@ static void frontend_init(struct budget *budget) tt1600_stv090x_config.tuner_set_refclk = ctl->tuner_set_refclk; tt1600_stv090x_config.tuner_get_status = ctl->tuner_get_status; - /* call the init function once to initialize - tuner's clock output divider and demod's - master clock */ + /* + * call the init function once to initialize + * tuner's clock output divider and demod's + * master clock + */ if (budget->dvb_frontend->ops.init) budget->dvb_frontend->ops.init(budget->dvb_frontend); @@ -730,9 +735,11 @@ static void frontend_init(struct budget *budget) tt1600_stv090x_config.tuner_set_refclk = ctl->tuner_set_refclk; tt1600_stv090x_config.tuner_get_status = ctl->tuner_get_status; - /* call the init function once to initialize - tuner's clock output divider and demod's - master clock */ + /* + * call the init function once to initialize + * tuner's clock output divider and demod's + * master clock + */ if (budget->dvb_frontend->ops.init) budget->dvb_frontend->ops.init(budget->dvb_frontend); From patchwork Mon Apr 15 02:24:08 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Herdler X-Patchwork-Id: 789130 Received: from mout.gmx.net (mout.gmx.net [212.227.15.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 39D0B14A84 for ; Mon, 15 Apr 2024 02:24:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=212.227.15.19 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713147880; cv=none; b=NGWelnrureMDT0xca1J1UC/jwnE3hX2txawifnSSAOw4M/JN0YM4Sr8fErpH1NPk6KWpTXb9LMiOnaicmA+ZR4A6jIlnXbPeRY3MedaKeyez1sAmbOb6Nn4YZcXusYU+YWwoS4SuG79KH0E7yCW82wvQ1Zb5Kxmvag+YI4etxgM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713147880; c=relaxed/simple; bh=PTD8HhX6WLpWm2pNsJtj67zZyE9xTwIMfBXI9ek28Ds=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=MGPpVDWWc1kdPy6mLIRy+VTUlC9KivkwPW19ycXIlE1U0zRsxUA52xCbqobgo23hlrpMmfyqxSg3ezBxmqhMtXWq9ImKb/uuzNezu2DEP+LEuCx/UI+abbYe1NgwFDP39h+jhW9MTfo++2MsR187x4gBjAF/P6XBAVyXjnu0eP8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=nurfuerspam.de; spf=pass smtp.mailfrom=nurfuerspam.de; dkim=pass (2048-bit key) header.d=nurfuerspam.de header.i=herdler@nurfuerspam.de header.b=ji6x4mif; arc=none smtp.client-ip=212.227.15.19 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=nurfuerspam.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=nurfuerspam.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=nurfuerspam.de header.i=herdler@nurfuerspam.de header.b="ji6x4mif" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nurfuerspam.de; s=s31663417; t=1713147873; x=1713752673; i=herdler@nurfuerspam.de; bh=hVbeD2rs06zmPrt4W/ONBYdKouvb6RnxPdD2rIs/NDk=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To: References; b=ji6x4mifMsB49+69luIcPCbJ+o4A8jivEjPN8HvF+tzfNhyBEaD3ggwwxpob1NU9 8if7011dUq8q/w9zF1uf5GZu/S3xaNOSBWWPK3sD7MZHWikS/ewFJHmVypZhmHqWP 0+BVT+7UKCJXqDrKtNEi16OG/gbOkwDl1fsL91gQcfV7U4Dkwwqgq0bsk6S9sLzmf MLVP5boB8e5yj9SAJTyGivGXCqwTWdCSbSOaNKN6UC14h+pHW0N/JUa70sdBK8R11 oJuoyvsFjfc6BhwZccmw+gb+rZAMb65LWUpA96ptZld6N07vBt4GsVIujs6TjZRSk RlqvQUIFK1Xb807IZQ== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from astro.haus ([91.132.223.107]) by mail.gmx.net (mrgmx005 [212.227.17.190]) with ESMTPSA (Nemesis) id 1M1Hdw-1ruX3z0TyE-002lgC; Mon, 15 Apr 2024 04:24:33 +0200 From: Stefan Herdler To: hverkuil-cisco@xs4all.nl Cc: linux-media@vger.kernel.org, smoch@web.de, tmn505@gmail.com, vinschen@redhat.com Subject: [PATCH v2 07/10] media: ttpci: coding style fixes: trailing_statements Date: Mon, 15 Apr 2024 04:24:08 +0200 Message-Id: <20240415022411.234580-8-herdler@nurfuerspam.de> X-Mailer: git-send-email 2.34.0 In-Reply-To: <20240415022411.234580-1-herdler@nurfuerspam.de> References: <20240415022411.234580-1-herdler@nurfuerspam.de> Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Provags-ID: V03:K1:W5WXj+Izndhq3Iy2PPc1ZFY2F+UQszEkFPnXFoXxBCgcLy9h5Gh yXrILIkH1gg12dqJ9qg6zuPTF3DRB2ujHf/t9nEoWiweHLpYEbAaK3VT7uMmoUdBn4af23c aS6NZhpUMVzLVMURD8Mib011SGE4Zw1bzmNWhC62bL9Eydq/2F7v3XUPCMh8+pT1FPap76K t7ZcyehS+0Hhrgdco16zg== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:QNTDb+H2qtQ=;XOyYtcMDj1Lt8nEDGUAk0O5u3Mi UCeN0O0dFIzDQAU3/6SqLElnGuPHENhWsAu6hw3ZVT9l6E8JcfmpYbhJs4LpkNNMkGFk/5PNQ Wj2h0YMfhtLg1m9jUfNzj4zI7cw9LA2qWIx1QdQrc5AsDRQDGYgiEHxpblh/u2ujPLrmVNr8b s3/jhXk0LdcYLKduuz0nAJZvZYR8PKvY3YAYq/TqayI9HxuTt21nhVD0ac8gokxyyFZr5+gvK nYtuHIIPV3orf+2DB39HoOtQqOQwHZoi1w51sCNoeQLkKzih0QL5LUu/A02AMeeARexI2TU7Q Tb3VvomrMhMhF/B3gVNUJVR/t6yop9q6daeJSOPUecUlgVreTHZKLIcCEVxtBsx3DOkci+vnU /IRjsUmfRcfLNaIynjZYCKUDTkwMZGvHkOOxAAta9zcP0csuRwvVC+IM0SRRbL/RPd0ZNoBb7 J6C1avXHqalRq08iUFoVLFy4DK8vX79WuoLX7SJ82a8fdNfqB7ENLsI/0uu/hCah2GmmJs35w evLpDu0WMzotXpa4t1E6vpJDiBZfwyL3bSu1KeCJKFeMPq+7aCTh57HAcPijSenbIgTxyrI+A t6yCf7YLeatdcrhDKGHRVGmlTW6+0WsQOR2fF2Ka+2Pld11hja5Z1oHovITqkyD+GnyPckfZ0 3CP/CX8I8PjJWKCVrhq3gAAnp8Cn0J8gkoNKfN/cm/yhIWmkhO9efmrJPhY6L/z4rkyxRv+/W xYAtG7sUxHGs4rhA31ccF+ft4pdH2E/AJwOtGmc6nf/tX0rDoV7XrCRydf3PmYYoDpNjHw6my noPlZbxOLgIvgQWj3yCKH8zLf3SweQL4hdx6exsmV3eG0= This patch fixes the following checkpatch errors: ERROR:TRAILING_STATEMENTS: trailing statements should be on next line Signed-off-by: Stefan Herdler --- ========================= Changes since v1 =============================== 1. Title ========================================================================== drivers/media/pci/ttpci/budget.c | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) -- 2.34.0 diff --git a/drivers/media/pci/ttpci/budget.c b/drivers/media/pci/ttpci/budget.c index 44f09b548..28a479ce0 100644 --- a/drivers/media/pci/ttpci/budget.c +++ b/drivers/media/pci/ttpci/budget.c @@ -213,7 +213,8 @@ static int alps_bsrv2_tuner_set_params(struct dvb_frontend *fe) pwr = 0; else if (c->frequency >= 1100000) pwr = 1; - else pwr = 2; + else + pwr = 2; buf[0] = (div >> 8) & 0x7f; buf[1] = div & 0xff; @@ -225,7 +226,8 @@ static int alps_bsrv2_tuner_set_params(struct dvb_frontend *fe) if (fe->ops.i2c_gate_ctrl) fe->ops.i2c_gate_ctrl(fe, 1); - if (i2c_transfer(&budget->i2c_adap, &msg, 1) != 1) return -EIO; + if (i2c_transfer(&budget->i2c_adap, &msg, 1) != 1) + return -EIO; return 0; } @@ -252,7 +254,8 @@ static int alps_tdbe2_tuner_set_params(struct dvb_frontend *fe) if (fe->ops.i2c_gate_ctrl) fe->ops.i2c_gate_ctrl(fe, 1); - if (i2c_transfer(&budget->i2c_adap, &msg, 1) != 1) return -EIO; + if (i2c_transfer(&budget->i2c_adap, &msg, 1) != 1) + return -EIO; return 0; } @@ -307,7 +310,8 @@ static int grundig_29504_401_tuner_set_params(struct dvb_frontend *fe) if (fe->ops.i2c_gate_ctrl) fe->ops.i2c_gate_ctrl(fe, 1); - if (i2c_transfer(&budget->i2c_adap, &msg, 1) != 1) return -EIO; + if (i2c_transfer(&budget->i2c_adap, &msg, 1) != 1) + return -EIO; return 0; } @@ -337,7 +341,8 @@ static int grundig_29504_451_tuner_set_params(struct dvb_frontend *fe) if (fe->ops.i2c_gate_ctrl) fe->ops.i2c_gate_ctrl(fe, 1); - if (i2c_transfer(&budget->i2c_adap, &msg, 1) != 1) return -EIO; + if (i2c_transfer(&budget->i2c_adap, &msg, 1) != 1) + return -EIO; return 0; } @@ -369,7 +374,8 @@ static int s5h1420_tuner_set_params(struct dvb_frontend *fe) if (fe->ops.i2c_gate_ctrl) fe->ops.i2c_gate_ctrl(fe, 1); - if (i2c_transfer(&budget->i2c_adap, &msg, 1) != 1) return -EIO; + if (i2c_transfer(&budget->i2c_adap, &msg, 1) != 1) + return -EIO; return 0; } From patchwork Mon Apr 15 02:24:09 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Herdler X-Patchwork-Id: 789129 Received: from mout.gmx.net (mout.gmx.net [212.227.15.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8FC9C168C7 for ; Mon, 15 Apr 2024 02:24:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=212.227.15.18 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713147880; cv=none; b=mBeaMMGxZxZu5wt+xQVb1RXswwQ9ZrbsAN5af+DU+wYqkQBkyNFoiFnPPuHkaGf50Dn8/FVXMLcaajIFxP1p9GviJsI0IV/q1XPzjso1WnS+zWGftxFc98b383z9Nh+G1nsObsBcCv0ZAANmsvUUJe/JU8mNDVhXe//1xlDPmW4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713147880; c=relaxed/simple; bh=+fy2X1pVT+jXud3Ov7mWj+B/J+M93Qa1meWgDAzFWB8=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=Betlu6YbSvE9OgQDN+aBPrBOyRm0XOY0uJtYDdgOAqKmJWOptC16ZaVIv8K+Aj9NkGAjC9b2UHQvR4mzraZfLo+KjfCJZdYGEUKiw4mKHH23aA6jYk5nYwc9NcnwVnnQWFjTlTjin/7FuzEBWg0CByJV91U8mRMV6fXkeoSNyFY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=nurfuerspam.de; spf=pass smtp.mailfrom=nurfuerspam.de; dkim=pass (2048-bit key) header.d=nurfuerspam.de header.i=herdler@nurfuerspam.de header.b=GGHMo1Wb; arc=none smtp.client-ip=212.227.15.18 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=nurfuerspam.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=nurfuerspam.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=nurfuerspam.de header.i=herdler@nurfuerspam.de header.b="GGHMo1Wb" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nurfuerspam.de; s=s31663417; t=1713147873; x=1713752673; i=herdler@nurfuerspam.de; bh=VqR+tx/OV7+F4CCxw9lZxOl7Q+RfXmRYGoPGVnjSYro=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:Message-Id:In-Reply-To: References:MIME-Version:Content-Transfer-Encoding:cc: content-transfer-encoding:content-type:date:from:message-id: mime-version:reply-to:subject:to; b=GGHMo1WbGJlYD06g9cqe608ho/hswhi5DnBngwn1tbipYMcOG0cWEu7wgGg+mbua RV2hdVKIS+io082fqLS3awmuHGtcXRndIHCElB6QY3oFp0SuPVnB1ahUfEaC3qPe4 scxTXL6iHTtiBHoHknEA/rL9PJV2Jg+lJBDW8bEyFzOrE2afGIQ2jTlL8qOfy/5FD dE5we7IBsyqnSymuOgFLQgvsMYrpCuGdHfQ6A4urLXY1CFCVDULq87Z+FxGC4PZ1W JJalYCz0niPQnFwrEhsAiKADSwUyXse9xqaZ5g1EwUn7ovZnODkncIYkhlfVmagCX b7MQHwhbeW0mENOTAw== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from astro.haus ([91.132.223.107]) by mail.gmx.net (mrgmx005 [212.227.17.190]) with ESMTPSA (Nemesis) id 1Mv31W-1smv691Itk-00r1zC; Mon, 15 Apr 2024 04:24:33 +0200 From: Stefan Herdler To: hverkuil-cisco@xs4all.nl Cc: linux-media@vger.kernel.org, smoch@web.de, tmn505@gmail.com, vinschen@redhat.com Subject: [PATCH v2 08/10] media: ttpci: coding style fixes: constant_comparsation Date: Mon, 15 Apr 2024 04:24:09 +0200 Message-Id: <20240415022411.234580-9-herdler@nurfuerspam.de> X-Mailer: git-send-email 2.34.0 In-Reply-To: <20240415022411.234580-1-herdler@nurfuerspam.de> References: <20240415022411.234580-1-herdler@nurfuerspam.de> Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Provags-ID: V03:K1:iTL1ZJX6382euxib/lvqdIypFCjzTO/2VytxzaQcnqsKmJTTj0z qKIbvtUXaJGIpm0yRx/pAl+9+ZvmwF19+pAVvv29Xhc3IDZpfPH9Q6sd4dVrNL/ApTUEyft fM9MAlyJ9LmeIVNdJgSkJ+RtypNXfy44ezSr0ymA6KnvUKj3fpE2balbNnzdmEGE3GqPYSA 4ZOfb/D+aUJMhe9UIlKJA== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:MUKci2UfHqA=;bN2pVfSHpl6Wcxw+S7OWoq5dHMs khpbspC4x1pUojUVL6V6dFtg3NCP24Dg3p5xghIxvCw44hpafuvNc+8SSvMjLmdwvZDGmJeKT gTAZBBKNW3O+8dmfn7TrwOpiYELN1empEvyVrA8FYqkAN87xoxOcY5y5G/pIDsKNzEZrrBmwl 0VSkrmXZL0bhvCi2PoFY+0CY+IZxrlGpHJpTH4AXjz72symXA1Nt3YJxlPZRdO42Em5+2EpoB hMn6kLJBbMvysReea1bEQ1rwAePydovLvp3oaVygW8bKMEzG3Q74nb/FMK/yXBrWxd1aN3zoE UqtPqOOmMJwUzOCtB1z58gDWVaTVSiXTtlx/zpjhxT2SoaodhZmBkeWfRYEcb0sb1qlhic7vs N3lFZZWL9PzliQwgEsB47iwaB8dqys7kPeYfdOZNCZAMUqc4TuiTXn9Z1bc9poiA4lpCHzb8n xSGmRz8ee+7MTqEoROtnLV92Xrv/+Qn94UhzHEgK4RaH/NLS6i8mQXJSlwqlh56Ybefoov2El o8untUYQjqSNm5U430kn9wn1SrwCAhPQ9bXxhg5F0ABTgSJyiRxMEOYqbLAlEpnbi+jLA3Qfo ZdnMFbZHmlhc4hmdpEftDVOrp1937EbKobG0RrrBFUgb/wtJ0U2eRq8fklFbhG78GNKXWDp/j wsztLVqk0XtWng/u90EFWgH+mysmhzcXN32FUgVQ/ccCAQG997lmKPvJclHRpr27BoQEY4DF2 s4sfHraJH6N457YrYJQ23P/JRGcix42bjFJJLDlEter0wKVLGMmMhrdwQXvRT/STHtMZpFH34 z2vL5nPOQ9XgxAkWD37eRJqYhf1qE4CgXWCUD3Q1NoPyU= This patch fixes the following checkpatch warnings: WARNING:CONSTANT_COMPARISON: Comparisons should place the constant on the right side of the test Signed-off-by: Stefan Herdler --- ========================= Changes since v1 =============================== 1. Title ========================================================================== drivers/media/pci/ttpci/budget-av.c | 4 ++-- drivers/media/pci/ttpci/budget-core.c | 2 +- drivers/media/pci/ttpci/budget.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) -- 2.34.0 diff --git a/drivers/media/pci/ttpci/budget-av.c b/drivers/media/pci/ttpci/budget-av.c index 9549e385a..76660d22f 100644 --- a/drivers/media/pci/ttpci/budget-av.c +++ b/drivers/media/pci/ttpci/budget-av.c @@ -442,7 +442,7 @@ static int saa7113_setinput(struct budget_av *budget_av, int input) { struct budget *budget = &budget_av->budget; - if (1 != budget_av->has_saa7113) + if (budget_av->has_saa7113 != 1) return -ENODEV; if (input == 1) { @@ -1366,7 +1366,7 @@ static int budget_av_detach(struct saa7146_dev *dev) dprintk(2, "dev: %p\n", dev); - if (1 == budget_av->has_saa7113) { + if (budget_av->has_saa7113 == 1) { saa7146_setgpio(dev, 0, SAA7146_GPIO_OUTLO); msleep(200); diff --git a/drivers/media/pci/ttpci/budget-core.c b/drivers/media/pci/ttpci/budget-core.c index dc8b2de30..101695c71 100644 --- a/drivers/media/pci/ttpci/budget-core.c +++ b/drivers/media/pci/ttpci/budget-core.c @@ -516,7 +516,7 @@ int ttpci_budget_init(struct budget *budget, struct saa7146_dev *dev, ttpci_eeprom_parse_mac(&budget->i2c_adap, budget->dvb_adapter.proposed_mac); budget->grabbing = saa7146_vmalloc_build_pgtable(dev->pci, budget->buffer_size, &budget->pt); - if (NULL == budget->grabbing) { + if (budget->grabbing == NULL) { ret = -ENOMEM; goto err_del_i2c; } diff --git a/drivers/media/pci/ttpci/budget.c b/drivers/media/pci/ttpci/budget.c index 28a479ce0..36aef9303 100644 --- a/drivers/media/pci/ttpci/budget.c +++ b/drivers/media/pci/ttpci/budget.c @@ -791,7 +791,7 @@ static int budget_attach(struct saa7146_dev *dev, struct saa7146_pci_extension_d int err; budget = kmalloc(sizeof(struct budget), GFP_KERNEL); - if (NULL == budget) + if (budget == NULL) return -ENOMEM; dprintk(2, "dev:%p, info:%p, budget:%p\n", dev, info, budget); From patchwork Mon Apr 15 02:24:11 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Herdler X-Patchwork-Id: 789127 Received: from mout.gmx.net (mout.gmx.net [212.227.15.15]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B0D26171C4 for ; Mon, 15 Apr 2024 02:24:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=212.227.15.15 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713147881; cv=none; b=UCfehLb7t0SqTV9a/50iIgXI69435ftNxDZtu4RL2Yflr2KjbEKjcj9wuzH0LpbfZS/5x7WpG45QDOzEXGCYY3CTR87q+yx/51PLfH3qBhh7dOPmsQYOt35Q3Aodaeoo7yOnci+Y2fii7nLbPmsjih+SXL370PnO7ZynNPM5DPs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713147881; c=relaxed/simple; bh=FrGR41KjPXPSi/OGFAbs5q9s10UZptk9DsOF1hda5Hw=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=uWKRaxxWPMoOTOtUsPYvyjdECjzYr1A+hJCaT8T5e1//ELCsucLiAiw7DIfcoV/iLoha53hy7BOapjgIbRNJF3Ruzu2q2sp3lxfhSAjSyo5AYiq9ojg+Yl10FpT9QaWwAGmmLmuxzQGFNsqpTN39YpCrHUBkftJSkoV1DxUYhg8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=nurfuerspam.de; spf=pass smtp.mailfrom=nurfuerspam.de; dkim=pass (2048-bit key) header.d=nurfuerspam.de header.i=herdler@nurfuerspam.de header.b=AoIec3sm; arc=none smtp.client-ip=212.227.15.15 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=nurfuerspam.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=nurfuerspam.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=nurfuerspam.de header.i=herdler@nurfuerspam.de header.b="AoIec3sm" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nurfuerspam.de; s=s31663417; t=1713147873; x=1713752673; i=herdler@nurfuerspam.de; bh=nYA4hDtQ0TIVI1N2KCTao57ubrdy7LJ8HIzWpARQ3j0=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To: References; b=AoIec3smddPusPvgXCsAHENJXTg5chqXqbmMQYqlO9VpMb+hLRSBTrCAZZnHvO4M vfI/OguDDcknJVQvrjC11uKa1/KHT88F79pb4D4xM1t9jWgu5jdEPRpSjQaHK+Y+k nZtsibiTSrIp2795zQfuY5oZviABMAw8/lKt12SBNW+q4EwernBKnssqdOi8qj9UN Qou0zWHbHhP9OhYvRyXR2FZwO3lUhwAmW/NTUiFC7tPeRNn9Yf+u8ePVFNQ2BfdI/ AKSKLdWCsJL4oLNhqvkf5JH/Kvyjbx+I4YBn6xIiuHPAEjOsCFcgnK+Zf2bzvrKKu ppDhrLuhReqfL3jcpA== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from astro.haus ([91.132.223.107]) by mail.gmx.net (mrgmx005 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MuUnA-1snT3z34iY-00rZwy; Mon, 15 Apr 2024 04:24:33 +0200 From: Stefan Herdler To: hverkuil-cisco@xs4all.nl Cc: linux-media@vger.kernel.org, smoch@web.de, tmn505@gmail.com, vinschen@redhat.com Subject: [PATCH v2 10/10] media: ttpci: coding style fixes: logging Date: Mon, 15 Apr 2024 04:24:11 +0200 Message-Id: <20240415022411.234580-11-herdler@nurfuerspam.de> X-Mailer: git-send-email 2.34.0 In-Reply-To: <20240415022411.234580-1-herdler@nurfuerspam.de> References: <20240415022411.234580-1-herdler@nurfuerspam.de> Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Provags-ID: V03:K1:C4S+40gEQqJ3D1pcrb+Z1mUvCJsWEVCBdmXZMiyX8RLLzWE3oGb bq6R+PoEssyHu2WBym11EBFW3drmR2zL5GoUNemAwF0R/DJ8flsEhW5aeoQ+mJbKNE3kcGS SwFcIcWHx91qlljutDcGY1LiKGwm72VAkZs48CWyIrHn2isI0ITZ0nLo5iEMPZ0CdABfyk8 ZSKiAbssdkWQDo65qh6qw== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:CCDHlV0hOiE=;K9SCso6i05Ttp/Lxf3QH74ZZkmg pK5OM6Ptg+7gPIjiwD03pZCw3TmYGtz6lJIFNUFW0gIA38xrdLsDn0JVLUSb6EvbKbh0uHlal suqdqVuv6xZecLoVRwADHFqzspDDKwoQxK1DpX1niTpR5ZsBkotcP2Ob8fBnu1lKWH6mhPmna NuzUIE91uwR3fJtyY5a+iAflgYvJImT95mnMtHeGq/46zKYkzslp7axcFyomiNMwW75VYVU/j e9vY+/yqfiJDi4x/jGkM8A9zjoqybpk1BbmsdU0LFTi94arsFx17Yl8KfW4KL8MFZ8IZnVyvC /8h2FFnXma6wpCU1YwKkR+v5GgczZA6Iu19hraqXhUEfTt1NCyv0oe6tFRcCtGW5wDAWCVM9N Yf7XgYHfrcCm429YobU6qKsGc8iwMGFFbPT+7VWIB7oxjXOMUG9SXCySjyG69llLtJrT4Vjvg 8V+dU0pjqYwu9vxpYAVRQDXc/DihiMi24z2a/PMFMt98tJ9hFpMKO6l+RKFyKF+hTHOwSLBi3 OBmuHorabP0To5Aq26/gPF7VI4yIX5tFpHx29k29rCuLzQGgl0iI6ymllyG2KB7dAOYX2RyEH lf90gyuJrJPaib/gq5UeODsDc9ANpPnWLXfsDr/vRhxglSPKQ333pPDudVt424cHG2nmrdXnn b+czlzCz1hBLnKarnuAh8/1H34WZ/3HxvjjltIoaRnMoZn7Tk3yIqZVuSknELQpz8EMrCTEBh 6am8wzKJeDhWCzWh+5WKPWUY8xA+oQ58srI/Dn5iKWrXeebCjpqRlOgveyt1LPQrVDO9lh7nu EOTRuBDDGH42e88W5o9B0GquOYyr0Iwzx9LwgYin34FYw= This patch fixes the following checkpatch warnings: WARNING:PRINTK_WITHOUT_KERN_LEVEL: printk() should include KERN_ facility level WARNING:PREFER_PR_LEVEL: Prefer [subsystem eg: netdev]_dbg([subsystem]dev, ... then dev_dbg(dev, ... then pr_debug(... to printk(KERN_DEBUG ... WARNING:EMBEDDED_FUNCTION_NAME: Prefer using '"%s...", __func__' to using 'ciintf_slot_ts_enable', this function's name, in a string CHECK:MACRO_ARG_PRECEDENCE: Macro argument 'level' may be better as '(level)' to avoid precedence issues There was no consistent style of logging functions used so far. Convert all logging to the appropriate pr_* macros. Add a global pr_fmt macro for the whole driver. Signed-off-by: Stefan Herdler --- ========================= Changes since v1 =============================== 1. Title 2. Add parentheses around '(level)' in dprintk macro. They aren't necessary in this case, but that isn't obvious. The parentheses are harmless and maybe they save someone time. 3. Add parentheses after __func__ string '%s()' in pr_* messages in the driver it self. This parentheses had been missing all the time. Pure cosmetics, but now the messages are consistent with the dprintk messages. ========================================================================== drivers/media/pci/ttpci/budget-av.c | 11 +++++----- drivers/media/pci/ttpci/budget-ci.c | 24 +++++++++++----------- drivers/media/pci/ttpci/budget-core.c | 4 ++-- drivers/media/pci/ttpci/budget.c | 29 +++++++++++++-------------- drivers/media/pci/ttpci/budget.h | 11 +++++++--- 5 files changed, 41 insertions(+), 38 deletions(-) -- 2.34.0 diff --git a/drivers/media/pci/ttpci/budget-av.c b/drivers/media/pci/ttpci/budget-av.c index 76660d22f..2e62c938e 100644 --- a/drivers/media/pci/ttpci/budget-av.c +++ b/drivers/media/pci/ttpci/budget-av.c @@ -16,7 +16,6 @@ * the project's page is at https://linuxtv.org */ -#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt #include "budget.h" #include "stv0299.h" @@ -206,7 +205,7 @@ static int ciintf_slot_reset(struct dvb_ca_en50221 *ca, int slot) if (slot != 0) return -EINVAL; - dprintk(1, "ciintf_slot_reset\n"); + dprintk(1, "ci slot reset\n"); budget_av->slot_status = SLOTSTATUS_RESET; saa7146_setgpio(saa, 2, SAA7146_GPIO_OUTHI); /* disable card */ @@ -235,7 +234,7 @@ static int ciintf_slot_shutdown(struct dvb_ca_en50221 *ca, int slot) if (slot != 0) return -EINVAL; - dprintk(1, "ciintf_slot_shutdown\n"); + dprintk(1, "ci slot shutdown\n"); ttpci_budget_set_video_port(saa, BUDGET_VIDEO_PORTB); budget_av->slot_status = SLOTSTATUS_NONE; @@ -251,7 +250,7 @@ static int ciintf_slot_ts_enable(struct dvb_ca_en50221 *ca, int slot) if (slot != 0) return -EINVAL; - dprintk(1, "ciintf_slot_ts_enable: %d\n", budget_av->slot_status); + dprintk(1, "ci slot status: %d\n", budget_av->slot_status); ttpci_budget_set_video_port(saa, BUDGET_VIDEO_PORTA); @@ -1464,7 +1463,7 @@ static int budget_av_attach(struct saa7146_dev *dev, struct saa7146_pci_extensio if (err != 0) { ttpci_budget_deinit(&budget_av->budget); kfree(budget_av); - ERR("cannot init vv subsystem\n"); + pr_err("cannot init vv subsystem\n"); return err; } vv_data.vid_ops.vidioc_enum_input = vidioc_enum_input; @@ -1476,7 +1475,7 @@ static int budget_av_attach(struct saa7146_dev *dev, struct saa7146_pci_extensio saa7146_vv_release(dev); ttpci_budget_deinit(&budget_av->budget); kfree(budget_av); - ERR("cannot register capture v4l2 device\n"); + pr_err("cannot register capture v4l2 device\n"); return err; } diff --git a/drivers/media/pci/ttpci/budget-ci.c b/drivers/media/pci/ttpci/budget-ci.c index 062dc14a7..76de40e3c 100644 --- a/drivers/media/pci/ttpci/budget-ci.c +++ b/drivers/media/pci/ttpci/budget-ci.c @@ -124,7 +124,7 @@ static void msp430_ir_interrupt(struct tasklet_struct *t) */ if (ir_debug) - printk("budget_ci: received byte 0x%02x\n", command); + pr_info("received byte 0x%02x\n", command); /* Remove repeat bit, we use every command */ command = command & 0x7f; @@ -165,7 +165,7 @@ static int msp430_ir_init(struct budget_ci *budget_ci) dev = rc_allocate_device(RC_DRIVER_SCANCODE); if (!dev) { - printk(KERN_ERR "budget_ci: IR interface initialisation failed\n"); + pr_err("IR interface initialisation failed\n"); return -ENOMEM; } @@ -224,7 +224,7 @@ static int msp430_ir_init(struct budget_ci *budget_ci) error = rc_register_device(dev); if (error) { - printk(KERN_ERR "budget_ci: could not init driver for IR device (code %d)\n", error); + pr_err("could not init driver for IR device (code %d)\n", error); rc_free_device(dev); return error; } @@ -485,7 +485,7 @@ static int ciintf_init(struct budget_ci *budget_ci) result = dvb_ca_en50221_init(&budget_ci->budget.dvb_adapter, &budget_ci->ca, ca_flags, 1); if (result != 0) { - printk("budget_ci: CI interface detected, but initialisation failed.\n"); + pr_err("CI interface detected, but initialisation failed.\n"); goto error; } @@ -504,7 +504,7 @@ static int ciintf_init(struct budget_ci *budget_ci) CICONTROL_RESET, 1, 0); // success! - printk("budget_ci: CI interface initialised\n"); + pr_info("CI interface initialised\n"); budget_ci->budget.ci_present = 1; // forge a fake CI IRQ so the CAM state is setup correctly @@ -1358,7 +1358,7 @@ static void frontend_init(struct budget_ci *budget_ci) budget_ci->budget.dvb_frontend->ops.dishnetwork_send_legacy_command = NULL; if (dvb_attach(lnbp21_attach, budget_ci->budget.dvb_frontend, &budget_ci->budget.i2c_adap, LNBP21_LLC, 0) == NULL) { - printk("%s: No LNBP21 found!\n", __func__); + pr_err("%s(): No LNBP21 found!\n", __func__); dvb_frontend_detach(budget_ci->budget.dvb_frontend); budget_ci->budget.dvb_frontend = NULL; } @@ -1369,7 +1369,7 @@ static void frontend_init(struct budget_ci *budget_ci) budget_ci->budget.dvb_frontend = dvb_attach(tda10023_attach, &tda10023_config, &budget_ci->budget.i2c_adap, 0x48); if (budget_ci->budget.dvb_frontend) { if (dvb_attach(tda827x_attach, budget_ci->budget.dvb_frontend, 0x61, &budget_ci->budget.i2c_adap, &tda827x_config) == NULL) { - printk(KERN_ERR "%s: No tda827x found!\n", __func__); + pr_err("%s(): No tda827x found!\n", __func__); dvb_frontend_detach(budget_ci->budget.dvb_frontend); budget_ci->budget.dvb_frontend = NULL; } @@ -1381,12 +1381,12 @@ static void frontend_init(struct budget_ci *budget_ci) if (budget_ci->budget.dvb_frontend) { if (dvb_attach(stb6000_attach, budget_ci->budget.dvb_frontend, 0x63, &budget_ci->budget.i2c_adap)) { if (!dvb_attach(lnbp21_attach, budget_ci->budget.dvb_frontend, &budget_ci->budget.i2c_adap, 0, 0)) { - printk(KERN_ERR "%s: No LNBP21 found!\n", __func__); + pr_err("%s(): No LNBP21 found!\n", __func__); dvb_frontend_detach(budget_ci->budget.dvb_frontend); budget_ci->budget.dvb_frontend = NULL; } } else { - printk(KERN_ERR "%s: No STB6000 found!\n", __func__); + pr_err("%s(): No STB6000 found!\n", __func__); dvb_frontend_detach(budget_ci->budget.dvb_frontend); budget_ci->budget.dvb_frontend = NULL; } @@ -1421,7 +1421,7 @@ static void frontend_init(struct budget_ci *budget_ci) if (budget_ci->budget.dvb_frontend) { if (dvb_attach(stb6100_attach, budget_ci->budget.dvb_frontend, &tt3200_stb6100_config, &budget_ci->budget.i2c_adap)) { if (!dvb_attach(lnbp21_attach, budget_ci->budget.dvb_frontend, &budget_ci->budget.i2c_adap, 0, 0)) { - printk("%s: No LNBP21 found!\n", __func__); + pr_err("%s(): No LNBP21 found!\n", __func__); dvb_frontend_detach(budget_ci->budget.dvb_frontend); budget_ci->budget.dvb_frontend = NULL; } @@ -1435,7 +1435,7 @@ static void frontend_init(struct budget_ci *budget_ci) } if (budget_ci->budget.dvb_frontend == NULL) { - printk("budget-ci: A frontend driver was not found for device [%04x:%04x] subsystem [%04x:%04x]\n", + pr_err("A frontend driver was not found for device [%04x:%04x] subsystem [%04x:%04x]\n", budget_ci->budget.dev->pci->vendor, budget_ci->budget.dev->pci->device, budget_ci->budget.dev->pci->subsystem_vendor, @@ -1443,7 +1443,7 @@ static void frontend_init(struct budget_ci *budget_ci) } else { if (dvb_register_frontend (&budget_ci->budget.dvb_adapter, budget_ci->budget.dvb_frontend)) { - printk("budget-ci: Frontend registration failed!\n"); + pr_err("Frontend registration failed!\n"); dvb_frontend_detach(budget_ci->budget.dvb_frontend); budget_ci->budget.dvb_frontend = NULL; } diff --git a/drivers/media/pci/ttpci/budget-core.c b/drivers/media/pci/ttpci/budget-core.c index 101695c71..d33adeca1 100644 --- a/drivers/media/pci/ttpci/budget-core.c +++ b/drivers/media/pci/ttpci/budget-core.c @@ -209,7 +209,7 @@ static void vpeirq(struct tasklet_struct *t) budget->buffer_warnings++; if (budget->buffer_warnings && time_after(jiffies, budget->buffer_warning_time)) { - printk("%s %s: used %d times >80%% of buffer (%u bytes now)\n", + pr_warn("%s %s: used %d times >80%% of buffer (%u bytes now)\n", budget->dev->name, __func__, budget->buffer_warnings, count); budget->buffer_warning_time = jiffies + BUFFER_WARNING_WAIT; budget->buffer_warnings = 0; @@ -473,7 +473,7 @@ int ttpci_budget_init(struct budget *budget, struct saa7146_dev *dev, budget->dev->name, budget->buffer_size > budget->buffer_width * budget->buffer_height ? "odd/even" : "single", budget->buffer_width, budget->buffer_height); - printk("%s: dma buffer size %u\n", budget->dev->name, budget->buffer_size); + pr_info("%s: dma buffer size %u\n", budget->dev->name, budget->buffer_size); ret = dvb_register_adapter(&budget->dvb_adapter, budget->card->name, owner, &budget->dev->pci->dev, adapter_nums); diff --git a/drivers/media/pci/ttpci/budget.c b/drivers/media/pci/ttpci/budget.c index 91b998808..f623c2509 100644 --- a/drivers/media/pci/ttpci/budget.c +++ b/drivers/media/pci/ttpci/budget.c @@ -537,7 +537,7 @@ static void frontend_init(struct budget *budget) case 0x4f52: /* Cards based on Philips Semi Sylt PCI ref. design */ budget->dvb_frontend = dvb_attach(stv0299_attach, &alps_bsru6_config, &budget->i2c_adap); if (budget->dvb_frontend) { - printk(KERN_INFO "budget: tuner ALPS BSRU6 in Philips Semi. Sylt detected\n"); + pr_info("tuner ALPS BSRU6 in Philips Semi. Sylt detected\n"); budget->dvb_frontend->ops.tuner_ops.set_params = alps_bsru6_tuner_set_params; budget->dvb_frontend->tuner_priv = &budget->i2c_adap; break; @@ -555,7 +555,7 @@ static void frontend_init(struct budget *budget) /* assume ALPS BSRU6 */ budget->dvb_frontend = dvb_attach(stv0299_attach, &alps_bsru6_config_activy, &budget->i2c_adap); if (budget->dvb_frontend) { - printk(KERN_INFO "budget: tuner ALPS BSRU6 detected\n"); + pr_info("tuner ALPS BSRU6 detected\n"); budget->dvb_frontend->ops.tuner_ops.set_params = alps_bsru6_tuner_set_params; budget->dvb_frontend->tuner_priv = &budget->i2c_adap; budget->dvb_frontend->ops.set_voltage = siemens_budget_set_voltage; @@ -571,7 +571,7 @@ static void frontend_init(struct budget *budget) msleep(250); budget->dvb_frontend = dvb_attach(stv0299_attach, &alps_bsbe1_config_activy, &budget->i2c_adap); if (budget->dvb_frontend) { - printk(KERN_INFO "budget: tuner ALPS BSBE1 detected\n"); + pr_info("tuner ALPS BSBE1 detected\n"); budget->dvb_frontend->ops.tuner_ops.set_params = alps_bsbe1_tuner_set_params; budget->dvb_frontend->tuner_priv = &budget->i2c_adap; budget->dvb_frontend->ops.set_voltage = siemens_budget_set_voltage; @@ -617,7 +617,7 @@ static void frontend_init(struct budget *budget) budget->dvb_frontend = fe; if (dvb_attach(lnbp21_attach, fe, &budget->i2c_adap, 0, 0) == NULL) { - printk("%s: No LNBP21 found!\n", __func__); + pr_err("%s(): No LNBP21 found!\n", __func__); goto error_out; } break; @@ -639,10 +639,10 @@ static void frontend_init(struct budget *budget) budget->dvb_frontend = fe; if (dvb_attach(tda826x_attach, fe, 0x60, &budget->i2c_adap, 0) == NULL) - printk("%s: No tda826x found!\n", __func__); + pr_err("%s(): No tda826x found!\n", __func__); if (dvb_attach(lnbp21_attach, fe, &budget->i2c_adap, 0, 0) == NULL) { - printk("%s: No LNBP21 found!\n", __func__); + pr_err("%s(): No LNBP21 found!\n", __func__); goto error_out; } break; @@ -695,11 +695,11 @@ static void frontend_init(struct budget *budget) budget->dvb_frontend, &budget->i2c_adap, &tt1600_isl6423_config) == NULL) { - printk(KERN_ERR "%s: No Intersil ISL6423 found!\n", __func__); + pr_err("%s(): No Intersil ISL6423 found!\n", __func__); goto error_out; } } else { - printk(KERN_ERR "%s: No STV6110(A) Silicon Tuner found!\n", __func__); + pr_err("%s(): No STV6110(A) Silicon Tuner found!\n", __func__); goto error_out; } } @@ -720,7 +720,7 @@ static void frontend_init(struct budget *budget) STV090x_DEMODULATOR_0); if (budget->dvb_frontend) { - printk(KERN_INFO "budget: Omicom S2 detected\n"); + pr_info("Omicom S2 detected\n"); ctl = dvb_attach(stv6110x_attach, budget->dvb_frontend, @@ -753,12 +753,11 @@ static void frontend_init(struct budget *budget) &budget->i2c_adap, LNBH24_PCL | LNBH24_TTX, LNBH24_TEN, 0x14>>1) == NULL) { - printk(KERN_ERR - "No LNBH24 found!\n"); + pr_err("No LNBH24 found!\n"); goto error_out; } } else { - printk(KERN_ERR "%s: No STV6110(A) Silicon Tuner found!\n", __func__); + pr_err("%s(): No STV6110(A) Silicon Tuner found!\n", __func__); goto error_out; } } @@ -767,7 +766,7 @@ static void frontend_init(struct budget *budget) } if (budget->dvb_frontend == NULL) { - printk("budget: A frontend driver was not found for device [%04x:%04x] subsystem [%04x:%04x]\n", + pr_err("A frontend driver was not found for device [%04x:%04x] subsystem [%04x:%04x]\n", budget->dev->pci->vendor, budget->dev->pci->device, budget->dev->pci->subsystem_vendor, @@ -779,7 +778,7 @@ static void frontend_init(struct budget *budget) return; error_out: - printk("budget: Frontend registration failed!\n"); + pr_err("Frontend registration failed!\n"); dvb_frontend_detach(budget->dvb_frontend); budget->dvb_frontend = NULL; } @@ -799,7 +798,7 @@ static int budget_attach(struct saa7146_dev *dev, struct saa7146_pci_extension_d err = ttpci_budget_init(budget, dev, info, THIS_MODULE, adapter_nr); if (err) { - printk("==> failed\n"); + pr_err("==> failed\n"); kfree(budget); return err; } diff --git a/drivers/media/pci/ttpci/budget.h b/drivers/media/pci/ttpci/budget.h index ae6de6a19..83ead34dc 100644 --- a/drivers/media/pci/ttpci/budget.h +++ b/drivers/media/pci/ttpci/budget.h @@ -3,6 +3,12 @@ #ifndef __BUDGET_DVB__ #define __BUDGET_DVB__ +#ifdef pr_fmt +#undef pr_fmt +#endif + +#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt + #include #include #include @@ -22,9 +28,8 @@ extern int budget_debug; #endif #define dprintk(level, fmt, arg...) do { \ - if (level & budget_debug) \ - printk(KERN_DEBUG KBUILD_MODNAME ": %s(): " fmt, \ - __func__, ##arg); \ + if ((level) & budget_debug) \ + pr_info("%s(): " fmt, __func__, ##arg); \ } while (0) #define TS_SIZE 188