From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E62C9C433DF for ; Tue, 30 Jun 2020 14:41:51 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id B52D5206BE for ; Tue, 30 Jun 2020 14:41:51 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="asumZiYr"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="kHiITqAE" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B52D5206BE Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:To:Subject:Message-ID:Date:From:In-Reply-To: References:MIME-Version:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=XLCPa8MVQkJku7sFtHu+EYE7YdnR/CVQXJa0YjOjS/g=; b=asumZiYrjM3E+ZE5meIaK7cTv yjTiVdzj0gG3BtelJRnq9ep657MGMADa0yqsu8cDjwnWR00eH0a9P4Fq9MDcJ0O7qF+m3oVl46vY7 XobEMW8DPbzv4Wje/p2JRKXCzSziEdZkHhI+Kec1jUDWsFQwf2Osfup0akNniia8hiUDSU8M6ALq/ y4631GyU63NW/OIq4TEVSAmjR7fGVSQM+jSgLFqIWKrnraoNK+hDaUp+IbIKzyzQhJZrwjy5G48AU H0wQgAuYQ66d4/BIlq62BlyTEFhlPIa1SepZc9r4P+lkSr2NDocIM10OCgWTuploArxdmCs5s+cBU 5y2miCpaQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jqHR0-0005GF-O2; Tue, 30 Jun 2020 14:40:30 +0000 Received: from mail-ej1-x644.google.com ([2a00:1450:4864:20::644]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jqHQw-0005FY-PI for linux-arm-kernel@lists.infradead.org; Tue, 30 Jun 2020 14:40:27 +0000 Received: by mail-ej1-x644.google.com with SMTP id ga4so20867234ejb.11 for ; Tue, 30 Jun 2020 07:40:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=5dm/rjfkAYeOKvGlUu0DpeagoQTdzbRa2RO8YsK1yDA=; b=kHiITqAEixH3gwtr3H907V2DiU+kxfWWD2Qw8bDRxPeYz3lrIuItsoM9Pv99DTsoWC UhqasAV1O8djAZGDZ+JytGCbb0A+zV9G/V20uuQDQ4QvgsDLx2aviX735++seHJYVbqa DPKky1AG/J1s7hSlUY6Y/XOMx5rtU0odTX47Q= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=5dm/rjfkAYeOKvGlUu0DpeagoQTdzbRa2RO8YsK1yDA=; b=Xb7HCh20Us9ene+RWTroO7RSd1rZuilrL8+YDyxwTfoAeLYotMg8oj9x4+E4DfsUy6 QwEah0VQE9HuZLbWC0mGlVu0HJvdB46IG1gzWmQuOmY66IBRzElhRGv0hTuzOh8+21vt vfZQ6YR8UgZITXj8s3Pt1vLxB47998lBWrd+WWK6UaOq1Ox6q2gQtywPeDw+aKMJdLxv waUhRaiWocS+CC1TG9DZSraWyBdF7ffPl5/fYnIewzTpI3dZw3JIvINFEudAFofLhlaQ taJoZr/eK4ppKICrfSv4TLU7gGYcAbv//u3DG6ynvFCMAWmDOGbV8YHeAHU+BPWj0ju4 7nYw== X-Gm-Message-State: AOAM530HTkHqB5X53A221+iRSp4NVRTRtsIeuD7nWt1MqA8EWTV8VKFi BlYUm+ClPnpy6UkTbVYnIBDv0AiCLXK05A== X-Google-Smtp-Source: ABdhPJylNcEUeiBGZWpKg9ySXdaZlkp2ca/H3gZWzkm7zi6s03WolmWNUWscIAzoRvdUJiawsNQ39w== X-Received: by 2002:a17:906:f88a:: with SMTP id lg10mr18256956ejb.317.1593528024827; Tue, 30 Jun 2020 07:40:24 -0700 (PDT) Received: from mail-wr1-f44.google.com (mail-wr1-f44.google.com. [209.85.221.44]) by smtp.gmail.com with ESMTPSA id oz7sm2148503ejb.96.2020.06.30.07.40.23 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 30 Jun 2020 07:40:24 -0700 (PDT) Received: by mail-wr1-f44.google.com with SMTP id f7so17458004wrw.1 for ; Tue, 30 Jun 2020 07:40:23 -0700 (PDT) X-Received: by 2002:adf:80e6:: with SMTP id 93mr21491180wrl.17.1593528023050; Tue, 30 Jun 2020 07:40:23 -0700 (PDT) MIME-Version: 1.0 References: <20200630024942.20891-1-dongchun.zhu@mediatek.com> <20200630024942.20891-3-dongchun.zhu@mediatek.com> <20200630095430.GF16711@paasikivi.fi.intel.com> <20200630143705.GW3703480@smile.fi.intel.com> In-Reply-To: <20200630143705.GW3703480@smile.fi.intel.com> From: Tomasz Figa Date: Tue, 30 Jun 2020 16:40:12 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH V11 2/2] media: i2c: ov02a10: Add OV02A10 image sensor driver To: Andy Shevchenko X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , linux-devicetree , Nicolas Boichat , srv_heupstream , Linus Walleij , =?UTF-8?B?U2hlbmduYW4gV2FuZyAo546L5Zyj55S3KQ==?= , Louis Kuo , Bartosz Golaszewski , Sj Huang , Rob Herring , "moderated list:ARM/Mediatek SoC support" , Dongchun Zhu , Sakari Ailus , Matthias Brugger , Cao Bing Bu , Mauro Carvalho Chehab , "list@263.net:IOMMU DRIVERS , Joerg Roedel , " , Linux Media Mailing List Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Tue, Jun 30, 2020 at 4:37 PM Andy Shevchenko wrote: > > On Tue, Jun 30, 2020 at 04:21:31PM +0200, Tomasz Figa wrote: > > On Tue, Jun 30, 2020 at 4:19 PM Tomasz Figa wrote: > > > On Tue, Jun 30, 2020 at 11:54 AM Sakari Ailus > > > wrote: > > ... > > > > > > + ov02a10->rst_gpio = devm_gpiod_get(dev, "reset", GPIOD_OUT_LOW); > > > > > > > > > > > > Shouldn't this be GPIOD_OUT_HIGH? That's the state it'll be after powering > > > > the sensor off the first time. Alternatively make reset signal high in > > > > runtime suspend callback. > > > > > > We might want to keep the signals low when the regulators are powered > > > down, to reduce the leakage. > > > > Ah, I actually recall that the reset pin was physically active low, so > > we would indeed better keep it at HIGH. Sorry for the noise. > > Here HIGH means "asserted", so in the code above it's LOW, means "deasserted", > i.o.w. non-reset state. I dunno what is better, it depends to the firmware / > driver expectations of the device configuration (from the power point of view, > HIGH makes sense here, and not LOW, i.o.w. asserted reset line). > > And nice of the logical state that it doesn't depend to the active low / high > (the latter just transparent to the user). Yeah, after reading through the GPIO subsystem documentation and discussing with a bunch of people on how to interpret it, we concluded that the driver needs to deal only with the logical state of the signal. Actually, I later realized that the problem of leakage should likely be solved by pinctrl suspend settings, based on given hardware conditions, rather than the driver explicitly. Best regards, Tomasz _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel