Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp2514315rdg; Mon, 16 Oct 2023 06:55:43 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHvJCyem77TUXOGSmQlDdfGAwEYoKQqdp/plTv7eEyzJtOFjWOlfNTv+Lr7m3uI6eQIofar X-Received: by 2002:a05:6a00:2486:b0:6b8:a6d6:f51a with SMTP id c6-20020a056a00248600b006b8a6d6f51amr8094331pfv.31.1697464542741; Mon, 16 Oct 2023 06:55:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697464542; cv=none; d=google.com; s=arc-20160816; b=0UE1Q3WT7zt7qXRVhlt2RIPYz7WcZflwFYVJndE1IF9onCAqUTX8xUhq03h1hc+Hvl sLE56dtIDwiU1iGchob5ypNUGEycTsgbn2CgxeSoSRBC5VgzDetyZC6z/6Ic03yz0c/9 73Tn33So3GyvrQafH5PhUJ9FGb0mujSjjPD6Ht7XAvijbbzhPauMX++og9t1xx0Hgda1 Qea0WIydxCiAplrwAx0yIyJetFkeZAX2IypEtqDeOcjxI0nOz4YgyYASmr5fwmItx998 HrTUZKuz5j+2RiVhXQDhyj5HE6PfmWZ+SfWcaFtjQCkTbO57kzRYkKSI25139UGTLzEt 3zQQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=vpLg1REm8TRITAaIsdAu9miWjB6etVIqf2lxZGDt46k=; fh=lWZuwTq+eHv/RINm3VqkhNbQGloveH3ap6ACoCqy3vQ=; b=VPGFucozZV8p2npqUnwEvs8qhjKDzzvShId2SiMTacYJNr9dQhysIq6hx8Vbm+TyBc ZOSLOPeVqsdwswhVQVjtfNPr0NK4kJYHoK35K0PC7JNS5rv/Wk8eGXmSyLH37wB8q1A6 AjJ1T04EJQdAycEU1BBF/bDCj06Q2Mv9Qf+YzQUT5X9lhPncMRjGS8oLX7hwVQ4AZUyI PsbPBDAcF923otP0xafhjxqKbZ4kkr/4OlV3rxIodvlT6u129VLRCFwRGYd1UmY6Jvp7 S7WyH/F/ixFd7isfhzSA2uhGwlB7ojUmk5H5JQ0v4oCPXwSVnOKVx6Ovnd0WxvRwgmch Q7CA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=A+9vFEXw; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id i13-20020aa796ed000000b006bcf4cb2849si4182451pfq.154.2023.10.16.06.55.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Oct 2023 06:55:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) client-ip=2620:137:e000::3:3; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=A+9vFEXw; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 42E53808D693; Mon, 16 Oct 2023 06:55:37 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233374AbjJPNz1 (ORCPT + 99 others); Mon, 16 Oct 2023 09:55:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54734 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232380AbjJPNzZ (ORCPT ); Mon, 16 Oct 2023 09:55:25 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AC363EB; Mon, 16 Oct 2023 06:55:23 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 51D34C433C7; Mon, 16 Oct 2023 13:55:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1697464523; bh=0yiuMspPwLpIVtahu6CyE1/zM4ZcZrYi/mvg9LDr9ZU=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=A+9vFEXwiNmSlKNIO/JIfd+flMeyXnMoUltYCdk0YKitkj3KZ5F8CSephZk8PlZtz UKCbGtdCwguKOHwH0nw6mmG0uKmhjiDQNy5I+9TJc92JRTHDn6f9ud9KCAoZa0u0FZ po+IfCUBm7z+BLgEXPoSg/xhk1RBJLZ/KZJQpKSbsQaG44yHuE0N3j9IottZd/svjN acfmmnEI/c2vu2W6TWuxG33o0E3W0VnDwxw8EndH5jYzxIA8ZLG+Qp4Bil6KBO7a18 Aryu9bzXCh0HD3Sn6y3ol7jYNMh4yuQdYg3o2SzmnGSSw2AIcT9YdJvCNIvLNonu+X 4dv5Wb2S/h+cA== Received: from johan by xi.lan with local (Exim 4.96) (envelope-from ) id 1qsO3x-0004Ff-2S; Mon, 16 Oct 2023 15:55:18 +0200 Date: Mon, 16 Oct 2023 15:55:17 +0200 From: Johan Hovold To: Wolfram Sang Cc: linux-renesas-soc@vger.kernel.org, Geert Uytterhoeven , linux-kernel@vger.kernel.org Subject: Re: [PATCH v3 3/3] gnss: ubx: add support for the reset gpio Message-ID: References: <20230921133202.5828-1-wsa+renesas@sang-engineering.com> <20230921133202.5828-4-wsa+renesas@sang-engineering.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230921133202.5828-4-wsa+renesas@sang-engineering.com> X-Spam-Status: No, score=-1.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Mon, 16 Oct 2023 06:55:37 -0700 (PDT) On Thu, Sep 21, 2023 at 03:32:01PM +0200, Wolfram Sang wrote: > Tested with a Renesas KingFisher board. Because my GNSS device is hooked > up via UART and I2C simultaneously, I could verify functionality by > opening/closing the GNSS device using UART and see if the corresponding > I2C device was visible on the bus. Again, please try to make the commit message self-contained (e.g. without implicitly referring to Subject). Also say something about which u-blox module this is needed for since the modules I've seen do not have a reset line. > static int ubx_set_active(struct gnss_serial *gserial) > @@ -29,6 +31,8 @@ static int ubx_set_active(struct gnss_serial *gserial) > if (ret) > return ret; > > + gpiod_set_value_cansleep(data->reset_gpio, 0); > + > return 0; > } > > @@ -37,6 +41,8 @@ static int ubx_set_standby(struct gnss_serial *gserial) > struct ubx_data *data = gnss_serial_get_drvdata(gserial); > int ret; > > + gpiod_set_value_cansleep(data->reset_gpio, 1); > + > ret = regulator_disable(data->vcc); > if (ret) > return ret; > @@ -90,6 +96,13 @@ static int ubx_probe(struct serdev_device *serdev) > if (ret < 0 && ret != -ENODEV) > goto err_free_gserial; > > + /* Start with reset asserted */ > + data->reset_gpio = devm_gpiod_get_optional(&serdev->dev, "reset", GPIOD_OUT_HIGH); > + if (IS_ERR(data->reset_gpio)) { > + ret = PTR_ERR(data->reset_gpio); > + goto err_free_gserial; > + } So this means that the reset line will be asserted indefinitely in case the GNSS receiver is not used. Are you sure that's a good idea? I don't know yet which module this is for, or how this signal is supposed to be used, but the above makes this look more like an active-high (regulator) enable signal. Perhaps that's what it is or should be modelled as (i.e. as a fixed regulator). > + > ret = gnss_serial_register(gserial); > if (ret) > goto err_free_gserial; Johan