Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2468962imu; Mon, 19 Nov 2018 00:43:02 -0800 (PST) X-Google-Smtp-Source: AJdET5fNXIKuHlh6Onw1FXsBXInTwmYMIUFe3xZvw9XnZEduSx0kfJIHHVIQgAE968l+rvoQOfNU X-Received: by 2002:a63:4d0e:: with SMTP id a14mr12569740pgb.408.1542616982099; Mon, 19 Nov 2018 00:43:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542616982; cv=none; d=google.com; s=arc-20160816; b=gZmT/FnF0sM3/PDa01u4NMZ+Q3W5UtMKchn8f5AfOyjMmDmwHFhhsGoEn1FnI238iw FFbi772MTL3lq6orRAQRihlMEfS4bJHUlF1ginBKDUTw5J60asaWGiUe2Dnnv92rkpnh WkNar76VO6ex6OD3GKcTwkVW9rRqECUAuVkxlyo2u/L+ySFueDm5LdZWfx0G2pTTosjz i+UJIbfRGv6XZRyGxKzxnMV5l+z1vwGfsW3wjvtgWnDMBn1KiZdNN6/lUPAo/yD2ZZhS knB38sbKk6fUF7cGNAMgUi7SWLVB21mVFlAssv4IQKDUDBXws+/W2IXlHTJdqH9mjoF/ Q+rw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:to:references:message-id :content-transfer-encoding:cc:date:in-reply-to:from:subject :mime-version:dkim-signature; bh=AyiAKQum+RXiTls/RHPxHM7VRX12kcluwAqKaf04WlI=; b=WnKlhF41po42m/D312MUIckt5+oJd+WKIRPxVouYietrUaQnNS2/BwKMn793Nz+/ls jX78H3ogwTGPML9RiXC7TcfpWgP7bi6t89pj70vDX1FAM1YIpVl94PKqcBhasMXFkF0f I29RpwGYEefVridNfcjxIH5GsRiqjehgnFy0lKSQixD11GKK6WrhVPfvM3gEuGh/fMyo TfDjha4fy9SxTs3kL2P33xra3Gp1J3GcomhpIiB3x5Hu0loU9qsc9WXuukFRxYTYigBN 61SNZxz0TwNBI69zlWIQwfT93yTtuzGTZNzkXXZsV83j1jlu+WmwW4ZsMdS3vG8l2XKt 09ZA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@goldelico.com header.s=strato-dkim-0002 header.b=n260AeEX; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r2si11562580pgk.389.2018.11.19.00.42.46; Mon, 19 Nov 2018 00:43:02 -0800 (PST) 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=fail header.i=@goldelico.com header.s=strato-dkim-0002 header.b=n260AeEX; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727071AbeKSTFF (ORCPT + 99 others); Mon, 19 Nov 2018 14:05:05 -0500 Received: from mo4-p01-ob.smtp.rzone.de ([85.215.255.53]:26321 "EHLO mo4-p01-ob.smtp.rzone.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726311AbeKSTFF (ORCPT ); Mon, 19 Nov 2018 14:05:05 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1542616926; s=strato-dkim-0002; d=goldelico.com; h=To:References:Message-Id:Cc:Date:In-Reply-To:From:Subject: X-RZG-CLASS-ID:X-RZG-AUTH:From:Subject:Sender; bh=AyiAKQum+RXiTls/RHPxHM7VRX12kcluwAqKaf04WlI=; b=n260AeEXzfr526EwCkn5fXNOjT0kG9e+sP8YXs9nzfklFsl8jNtu4YvIx3+RHwSk2O FRvWJMyjuGBp5bzag8H/QQ/GLqtHDGFM82LkktnOLfHZwV4BotgrOjsGFXUx5RXRClGI J8M2R+OBsyYkUHAoIy42jpSPZMtY+QBL8sDInXKkl+sk0gglXFcweLoxEFIG1nNY/zJZ BH/rmnsSB8vm/KmDGvCh++0YaXb07lK11Mh3rPsKIi3QT4htrvmc7R0jcFlDkCUYSQEA BaZxqML0JBSBMd8qsPaiLJk4+6V1qOqVvqWIBo+8DDArFIyzw4Z4IwD7akzgxc3HQhZT FZvg== X-RZG-AUTH: ":JGIXVUS7cutRB/49FwqZ7WcJeFKiMgPgp8VKxflSZ1P34KBj7wpz8NMGH/zowDCvpOU=" X-RZG-CLASS-ID: mo00 Received: from imac.fritz.box by smtp.strato.de (RZmta 44.4 DYNA|AUTH) with ESMTPSA id c01a4cuAJ8fxApe (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (curve secp521r1 with 521 ECDH bits, eq. 15360 bits RSA)) (Client did not present a certificate); Mon, 19 Nov 2018 09:41:59 +0100 (CET) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Subject: Re: [Letux-kernel] [PATCH RFC 4/5] gnss: sirf: add a separate supply for a lna From: "H. Nikolaus Schaller" In-Reply-To: <20181118215801.12280-5-andreas@kemnade.info> Date: Mon, 19 Nov 2018 09:41:58 +0100 Cc: Johan Hovold , Rob Herring , Mark Rutland , devicetree , LKML , Discussions about the Letux Kernel Content-Transfer-Encoding: 7bit Message-Id: <1647CDC4-61E5-4673-B092-1124BAFC50D5@goldelico.com> References: <20181118215801.12280-1-andreas@kemnade.info> <20181118215801.12280-5-andreas@kemnade.info> To: Andreas Kemnade X-Mailer: Apple Mail (2.3124) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > Am 18.11.2018 um 22:58 schrieb Andreas Kemnade : > > Devices might have a separate lna between antenna output of the gps > chip and the antenna which might have a separate supply > > Signed-off-by: Andreas Kemnade > --- > drivers/gnss/sirf.c | 15 +++++++++++++++ > 1 file changed, 15 insertions(+) > > diff --git a/drivers/gnss/sirf.c b/drivers/gnss/sirf.c > index 6a0e5c0a2d62..f7573ca2dacd 100644 > --- a/drivers/gnss/sirf.c > +++ b/drivers/gnss/sirf.c > @@ -30,6 +30,7 @@ struct sirf_data { > struct serdev_device *serdev; > speed_t speed; > struct regulator *vcc; > + struct regulator *lna; > struct gpio_desc *on_off; > struct gpio_desc *wakeup; > int irq; > @@ -217,6 +218,7 @@ static int sirf_runtime_suspend(struct device *dev) > > if (!data->on_off) > return regulator_disable(data->vcc); > + regulator_disable(data->lna); > ret = sirf_set_active(data, false); > > if (ret) > @@ -245,13 +247,20 @@ static int sirf_runtime_resume(struct device *dev) > if (ret) > goto err_close_serdev; > } > + > + ret = regulator_enable(data->lna); > + if (ret) > + goto err_disable_vcc; > + > ret = sirf_set_active(data, true); > > if (!ret) > return 0; > > +err_disable_vcc: > if (!data->on_off) > regulator_disable(data->vcc); > + > err_close_serdev: > serdev_device_close(data->serdev); > return ret; > @@ -340,6 +349,12 @@ static int sirf_probe(struct serdev_device *serdev) > goto err_put_device; > } > > + data->lna = devm_regulator_get(dev, "lna"); > + if (IS_ERR(data->lna)) { > + ret = PTR_ERR(data->lna); > + goto err_put_device; > + } > + > data->on_off = devm_gpiod_get_optional(dev, "sirf,onoff", > GPIOD_OUT_LOW); > if (IS_ERR(data->on_off)) > -- > 2.11.0 > > _______________________________________________ > http://projects.goldelico.com/p/gta04-kernel/ > Letux-kernel mailing list > Letux-kernel@openphoenux.org > http://lists.goldelico.com/mailman/listinfo.cgi/letux-kernel Looks good and to do what it is designed for. Acked-by: H. Nikolaus Schaller BR and thanks, Nikolaus