From patchwork Mon Jul 16 09:08:14 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pavel Machek X-Patchwork-Id: 10526297 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id E07DB60545 for ; Mon, 16 Jul 2018 09:08:43 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C879C288C3 for ; Mon, 16 Jul 2018 09:08:43 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id BC53828977; Mon, 16 Jul 2018 09:08:43 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 74438288C3 for ; Mon, 16 Jul 2018 09:08:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender:Content-Type: List-Subscribe:List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: In-Reply-To:MIME-Version:References:Message-ID:Subject:To:From:Date:Reply-To: Cc:Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=0bAuVl97cUQ31X21xrgWBaBBTqMP8MQH23YTBlZ/JK0=; b=T/bzhsEtZ/qa2f+WIagDmD/tN vwGKeH+gML/WChRlefHqzoe+FMeC5WJMekFs9IIunXSobJwKYf+0lIIwtRkyO4Te9j3xdPYBe4qDV xMtGhkFANhRPyE30HF0XQNHqhaSUNPQv1ms2hhgZTZs3Z/ZdInH1xZwO6HVx0vfbhIIa7Svls5fw7 9zTZJI+C7Va3kVejGIQSuzBU4vTmdBVuDjxtoQrBxdcOcJa5tJTDn90lOSzB4A9vDmssD44zKCrqD 5dN8oen9JRMWTx8RNx+PkpZqG/3V6RYBUzEzUoaQOcOo4G1Iz7C0p4HVzN8eJAcq9mzptrXeR0Sih 87pcxKoKA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fezUm-0004ZX-0a; Mon, 16 Jul 2018 09:08:40 +0000 Received: from atrey.karlin.mff.cuni.cz ([195.113.26.193]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fezUZ-0004Tu-19 for linux-arm-kernel@lists.infradead.org; Mon, 16 Jul 2018 09:08:37 +0000 Received: by atrey.karlin.mff.cuni.cz (Postfix, from userid 512) id 030FF8051F; Mon, 16 Jul 2018 11:08:14 +0200 (CEST) Date: Mon, 16 Jul 2018 11:08:14 +0200 From: Pavel Machek To: kernel list , linux-arm-kernel , linux-omap@vger.kernel.org, tony@atomide.com, sre@kernel.org, nekit1000@gmail.com, mpartap@gmx.net, merlijn@wizzup.org, gshark.jeong@gmail.com, m.chehab@samsung.com, sakari.ailus@iki.fi, linux-media@vger.kernel.org Subject: [PATCH v2] media: i2c: lm3560: use conservative defaults Message-ID: <20180716090814.GA4505@amd> References: <20180506080250.GA24114@amd> MIME-Version: 1.0 In-Reply-To: <20180506080250.GA24114@amd> User-Agent: Mutt/1.5.23 (2014-03-12) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180716_020827_283817_236AA5E6 X-CRM114-Status: GOOD ( 11.35 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP If no pdata is found, we should use lowest current settings, not highest. Signed-off-by: Pavel Machek --- v2: I got notification from patchwork that patch no longer applies, so I'm rediffing the patch. diff --git a/drivers/media/i2c/lm3560.c b/drivers/media/i2c/lm3560.c index b600e03a..c4e5ed5 100644 --- a/drivers/media/i2c/lm3560.c +++ b/drivers/media/i2c/lm3560.c @@ -420,14 +434,14 @@ static int lm3560_probe(struct i2c_client *client, pdata = devm_kzalloc(&client->dev, sizeof(*pdata), GFP_KERNEL); if (pdata == NULL) return -ENODEV; - pdata->peak = LM3560_PEAK_3600mA; - pdata->max_flash_timeout = LM3560_FLASH_TOUT_MAX; + pdata->peak = LM3560_PEAK_1600mA; + pdata->max_flash_timeout = LM3560_FLASH_TOUT_MIN; /* led 1 */ - pdata->max_flash_brt[LM3560_LED0] = LM3560_FLASH_BRT_MAX; - pdata->max_torch_brt[LM3560_LED0] = LM3560_TORCH_BRT_MAX; + pdata->max_flash_brt[LM3560_LED0] = LM3560_FLASH_BRT_MIN; + pdata->max_torch_brt[LM3560_LED0] = LM3560_TORCH_BRT_MIN; /* led 2 */ - pdata->max_flash_brt[LM3560_LED1] = LM3560_FLASH_BRT_MAX; - pdata->max_torch_brt[LM3560_LED1] = LM3560_TORCH_BRT_MAX; + pdata->max_flash_brt[LM3560_LED1] = LM3560_FLASH_BRT_MIN; + pdata->max_torch_brt[LM3560_LED1] = LM3560_TORCH_BRT_MIN; } flash->pdata = pdata; flash->dev = &client->dev;