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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2B878C05027 for ; Mon, 23 Jan 2023 18:40:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232095AbjAWSkf (ORCPT ); Mon, 23 Jan 2023 13:40:35 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51510 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230109AbjAWSke (ORCPT ); Mon, 23 Jan 2023 13:40:34 -0500 Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7A3C82310A for ; Mon, 23 Jan 2023 10:40:33 -0800 (PST) X-IronPort-AV: E=McAfee;i="6500,9779,10599"; a="323808518" X-IronPort-AV: E=Sophos;i="5.97,240,1669104000"; d="scan'208";a="323808518" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Jan 2023 10:40:33 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10599"; a="770006440" X-IronPort-AV: E=Sophos;i="5.97,240,1669104000"; d="scan'208";a="770006440" Received: from smile.fi.intel.com ([10.237.72.54]) by fmsmga002.fm.intel.com with ESMTP; 23 Jan 2023 10:40:30 -0800 Received: from andy by smile.fi.intel.com with local (Exim 4.96) (envelope-from ) id 1pK1k4-00DsRe-2u; Mon, 23 Jan 2023 20:40:28 +0200 Date: Mon, 23 Jan 2023 20:40:28 +0200 From: Andy Shevchenko To: Hans de Goede Cc: Mauro Carvalho Chehab , Sakari Ailus , Tsuchiya Yuto , Yury Luneff , Nable , andrey.i.trufanov@gmail.com, Fabio Aiuto , linux-media@vger.kernel.org, linux-staging@lists.linux.dev Subject: Re: [PATCH 52/57] media: atomisp: ov2722: Fix GPIO1 polarity Message-ID: References: <20230123125205.622152-1-hdegoede@redhat.com> <20230123125205.622152-53-hdegoede@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230123125205.622152-53-hdegoede@redhat.com> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org On Mon, Jan 23, 2023 at 01:52:00PM +0100, Hans de Goede wrote: > The comment claims the PWDN pin is active when pulled down in other words, > it is /power-down so it needs to be driven high to get the sensor > powered-up (not powered down) and flag is 1 when powering-up the sensor > so the ! is wrong, drop it. > > This also matches with the schematics which I have which shows GPIO1 also > enables a 3.3v line to the sensor-module which controls the privacy-LED > and indeed before this patch the privacy LED was inverted from what it > should be (and the sensor did not work). Code-wise it's okay Reviewed-by: Andy Shevchenko > Signed-off-by: Hans de Goede > --- > drivers/staging/media/atomisp/i2c/atomisp-ov2722.c | 5 +---- > 1 file changed, 1 insertion(+), 4 deletions(-) > > diff --git a/drivers/staging/media/atomisp/i2c/atomisp-ov2722.c b/drivers/staging/media/atomisp/i2c/atomisp-ov2722.c > index d874e12da8cc..83d036b5d772 100644 > --- a/drivers/staging/media/atomisp/i2c/atomisp-ov2722.c > +++ b/drivers/staging/media/atomisp/i2c/atomisp-ov2722.c > @@ -512,10 +512,7 @@ static int gpio_ctrl(struct v4l2_subdev *sd, bool flag) > * before PWDN# when turning it on or off. > */ > ret = dev->platform_data->gpio0_ctrl(sd, flag); > - /* > - *ov2722 PWDN# active high when pull down,opposite to the convention > - */ > - ret |= dev->platform_data->gpio1_ctrl(sd, !flag); > + ret |= dev->platform_data->gpio1_ctrl(sd, flag); > return ret; > } > > -- > 2.39.0 > -- With Best Regards, Andy Shevchenko