Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp782063imm; Fri, 10 Aug 2018 23:12:16 -0700 (PDT) X-Google-Smtp-Source: AA+uWPwy40M1sSBzAtUXiRzsdobRoZslBJr2racSM/EVGZmw3PBupsX9cwMF/aCpbEJ0V9X9wlJZ X-Received: by 2002:a63:375b:: with SMTP id g27-v6mr9195819pgn.59.1533967936110; Fri, 10 Aug 2018 23:12:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533967936; cv=none; d=google.com; s=arc-20160816; b=kJ6km6EL7r38TSl+9FGuXeB34AiSOVOqfy120QgBptWPZw0GlfW3pxwv1LzlBPKe9+ 2WyomnubfddC6LNlO1dLabwSCRuH+/0vU8E8WnqzhkHjl5m/G+6bhP537Uu/T8id1fFm ZAZmnPLncmbg9SgPZ4sb1p+W+JVqhB3kMdf7om07PSEKiE+cEDuXw8TC1UHTznSkz0Ux yPL+r4HLG4sDf4jibhKLnrHE4FFLm0UzXxtXCeYrnzJoRxNY5UufuNRH7au9OgzkwkfO YMWyiW066qW3M1L4gFCKoomnddpY9GvoorD7/2uEhJbL/93NHU6ksBzFcSQ/labMHSgM eruw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :message-id:from:references:to:subject:dkim-signature :arc-authentication-results; bh=W/PBxhm58S9GesjcpGCqwH9TArQc/CnGTDtnMEyGEWU=; b=kNvCow88d943U+3Qn5pvQFX6Kr2YGjPKhDFLei0zqdy2Awq9s7vYK50IpGxc27W85N vPaykEYEN2ipejZRAZknAK63CHQEsETADI1lInCUUCE9QWY8wozbxb8V4H2U3IhtBx0n QMooN0jBVwdQTi0hjDztjjqqAUVfhUNLXuONvq5wdOYWCwBCk/oPvGzl40qcjPqAiAp3 rsleSohBAknD7N7Op9xr81MPyi5wec4SWoY20p7rIJVLRk1ARi7UFcTlmpxPijvPE+z8 1KgCkkuAxNV9ru/HcrdM17S57iOklkigx01klmadNBCpOLSujhVKc/trj/ERKT0Sp9Nn b3LA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=J8AAgL1v; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e21-v6si10649112pgl.148.2018.08.10.23.11.48; Fri, 10 Aug 2018 23:12:16 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=J8AAgL1v; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727206AbeHKIn2 (ORCPT + 99 others); Sat, 11 Aug 2018 04:43:28 -0400 Received: from mail-pg1-f195.google.com ([209.85.215.195]:35372 "EHLO mail-pg1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727088AbeHKIn2 (ORCPT ); Sat, 11 Aug 2018 04:43:28 -0400 Received: by mail-pg1-f195.google.com with SMTP id w10-v6so5326520pgv.2; Fri, 10 Aug 2018 23:10:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-transfer-encoding:content-language; bh=W/PBxhm58S9GesjcpGCqwH9TArQc/CnGTDtnMEyGEWU=; b=J8AAgL1vtEmPA1t+HyRLuv2t3+3f2PPCB3DnjrvNqtc0Do4q+JjJGFDHiAhhaHADvz GX6UoX1tx0rdQAsJ7i03v55oQj/uScOESA+ICJ+/nHOb0s2NJorDY2ZsH2mszcBApwPz ja3S1qJJUKjS0/Pt94hVny0PDTnYC14YaoRATsq6bODM+EK5Op+xk4oisyIRKiIXJRL6 HzQRHHX1lc1H+l+4WLZZny/66Xlf4xryVq/dOdVox+Vu8ZvKVwc8+BByW+aISnzm1xTW EFrNzAt+Jvk3p2mUHiUOuyz1k3IZK/FJM2a38cjO+KQ5BT4E8VvR1h+QV9zbbkVMZTE+ Pqtg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=W/PBxhm58S9GesjcpGCqwH9TArQc/CnGTDtnMEyGEWU=; b=BHIxnKkF7u3SJfKq/Dcu/NVBbos3/zt+PQX6vmQITHdxov04dNjR/DAYcp48LDKYPp WHB766Y9dZDu0nSoC3v8ZIqVKA7QTzBfgKl43iIOOEUfDBttGkwSRhK6fGBH/u9X1Asp HE+CVNtfdk65CgIx1Wh/XzKFRnqeVb5B81HRsaM0rbegq3ZKY2P7ffCjrIbgEVrjen9y eiwBEuQMdgsjO6CW9o2dJyMVfyUgWY4CVdMF7XbpobLaYtTqgl/1VhCk7nSry5hM8aoM FPstD7uDcJ3NxthoHrXpPfgbGZ0mXfaV5Mtubj8DqDX6rcalHI+ZbGx4f0YHSWFPcAUU f0eQ== X-Gm-Message-State: AOUpUlEiJ0sGqaM5Kcj3WOREO04FLTnDNOl0WbiIAt1sQEnU9gPWrkw4 LolQE4eXjkwnxMEsPEJEKT8dsYSv X-Received: by 2002:a63:9311:: with SMTP id b17-v6mr9126394pge.261.1533967824277; Fri, 10 Aug 2018 23:10:24 -0700 (PDT) Received: from [192.168.219.100] ([116.36.201.74]) by smtp.gmail.com with ESMTPSA id 22-v6sm20210097pfl.126.2018.08.10.23.10.17 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 10 Aug 2018 23:10:23 -0700 (PDT) Subject: Re: [PATCH v2] media: i2c: lm3560: use conservative defaults To: Pavel Machek , 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, m.chehab@samsung.com, sakari.ailus@iki.fi, linux-media@vger.kernel.org References: <20180506080250.GA24114@amd> <20180716090814.GA4505@amd> From: Daniel Jeong Message-ID: <3a9ece34-baad-a19d-c3bd-96aa458ea70b@gmail.com> Date: Sat, 11 Aug 2018 15:10:14 +0900 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-Version: 1.0 In-Reply-To: <20180716090814.GA4505@amd> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Pavel, I think if there is not exist pdata, it should be set to the value of power on reset (POR) to sync with the chip. According to the LM3560 datasheet, Flash Timeout is 512ms, Flash current is 875mA and Torch Current is 93.75mA. Daniel Jeong. On 07/016/2018 18:08 PM, Pavel Machek wrote: > 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; > > >