Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp2449561rdb; Fri, 8 Dec 2023 08:24:47 -0800 (PST) X-Google-Smtp-Source: AGHT+IF9pDJ/57GFd1Gj4G7dtIpgc7uH9csKoD/hPZoI5RXO0b6rjq7WWZl21NX6jp8PJJp7xd4d X-Received: by 2002:a17:906:209b:b0:a19:d40a:d1ea with SMTP id 27-20020a170906209b00b00a19d40ad1eamr65756ejq.182.1702052687250; Fri, 08 Dec 2023 08:24:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702052687; cv=none; d=google.com; s=arc-20160816; b=h/gopQ7IOvBQ0x1CCJ+LfaitMLKhQ38GB6bPrVPbha4uFQfqsKiYv6Pu0oUaFo3Wlg zJyJyUlQZpIbdMHx3SLWfNSdTxe5PnfpIM54B8S2+ikzn5V+IaKjs5ZadTKz8wDs9rvZ jTEWNcPCepnrvRJvcY1jmCimWyHAFX4GvgHS4cSco84KRKRpGkll2Bq+H/rnVmfDBYrB gCry7A2jTLq4sKv8ySOFAeO0DvBo/ix1/7smI6andle0yl5Yak5JxoAqTqctwtbVzNEx OUvHtfKGOoRefSeJyjWVO6yKBjH9cIpLSexWpyHefEBoljL327vwRXgAsFJByO7//tUa OFNA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=/aleP5LPBM7lqq1kWYQka4UxyA+FDjVBdcihpB8XHcw=; fh=WwWIecA3Hw3OMgZ6BFZbcb5ypESYYS5TOQj01eA2b1Q=; b=m3jlYNxfmLe9S+7Aa0g55xiREjPtZjxIKXaZK8DEGogEBsdxzl83OqFRi5K8SP46Bi s/L0KQO5DgYSejrGF2MkxmeQ+9E/yDYNStAwg9RsBhdkI6hTsbdb7NQIVyVy7/aoZyWK g6B/48BrWTsvxy3eeWtyQcFiz6ne0cXi7cG1ry1c9sg1k3cmrSN7uKOt4T6pCxn+74Ga y3e1wUKaSTCbQ4LhI6wKJIq1aQoznUKqTsaJfQfFafzP1j0SQeKZn1CHc3ibBOs2Nv43 R6RZA7VA3xK+TC+TkyQHkX1wVPEApplo1OaIv3kT0O9Cir778bJ1otXWQxSq/aLSVyFy qliw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=LC+BiU9K; spf=pass (google.com: domain of linux-bluetooth+bounces-479-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-bluetooth+bounces-479-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id x17-20020a170906711100b00a1cbd69c19fsi886481ejj.984.2023.12.08.08.24.47 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Dec 2023 08:24:47 -0800 (PST) Received-SPF: pass (google.com: domain of linux-bluetooth+bounces-479-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=LC+BiU9K; spf=pass (google.com: domain of linux-bluetooth+bounces-479-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-bluetooth+bounces-479-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id F35971F212B2 for ; Fri, 8 Dec 2023 16:24:46 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6AC24374EC; Fri, 8 Dec 2023 16:24:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="LC+BiU9K" X-Original-To: linux-bluetooth@vger.kernel.org Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9CBBA37173 for ; Fri, 8 Dec 2023 16:24:38 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 02C57C433C9; Fri, 8 Dec 2023 16:24:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1702052678; bh=gykiqYtc4k3IIgq0rB2Qqi/i6sr8CFwAMkaTgwLZCaY=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=LC+BiU9KOsLc7DDJe/HQilCeW5KGpfwDI7EHKQbzrIu/+TQuJdIAalhad0VByrU3A 0w6++h3e9aM0yPpmhhLL2g0ZoGxdBMwYtmllD6QVKB+R2oe4oPGzSs7+MQcfqlWZk9 VcwBdwf2ab2MW310u+dlix4jGulx3l4ZzSfxNGTXVyWCFKdi5LQFWHwtlSwpVncR32 nHntqJBVCyScpH9vwYA78Rmovru5AWX8OgkIUp9POW302tOsdjx1gDOwsj37QY3gk0 xLMFELWl8xVCMMEK4UbRuWAvaofUUX9KlAh96d95qFDbarK3bT3rvNjZH1/Hl9SfPi jz8NcUvLUzpGw== Received: from johan by xi.lan with local (Exim 4.96.2) (envelope-from ) id 1rBdfL-0004nG-2C; Fri, 08 Dec 2023 17:25:28 +0100 Date: Fri, 8 Dec 2023 17:25:27 +0100 From: Johan Hovold To: Andreas Kemnade Cc: Tony Lindgren , marcel@holtmann.org, johan.hedberg@gmail.com, luiz.dentz@gmail.com, arnd@arndb.de, gregkh@linuxfoundation.org, linux-bluetooth@vger.kernel.org, linux-kernel@vger.kernel.org, tomi.valkeinen@ideasonboard.com, =?utf-8?B?UMOpdGVy?= Ujfalusi , robh@kernel.org Subject: Re: [RFC PATCH 0/3] bluetooth/gnss: GNSS support for TiWi chips Message-ID: References: <20231126191840.110564-1-andreas@kemnade.info> <20231127135424.GO5169@atomide.com> <20231127215108.6e985819@aktux> Precedence: bulk X-Mailing-List: linux-bluetooth@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231127215108.6e985819@aktux> On Mon, Nov 27, 2023 at 09:51:08PM +0100, Andreas Kemnade wrote: > On Mon, 27 Nov 2023 15:54:24 +0200 > Tony Lindgren wrote: > > > - Output at /dev/gnssX: > > > AI2 vs. NMEA > > > The chip can be configured into sending AI2-encapsulated NMEA, > > > or proving data in a binary format. > > > Some research has to be done yet for the details. > > > A pile of logs is waiting for further analysis... Can you say something more about what the protocol looks like? Is there some common framing that can/should be stripped by the driver in both modes? > > > > > > Arguments for/against NMEA: > > > + Userspace is prepared to handle it > > > + Power management can be easily done by the kernel > > > - Less functionality can be used. > > > > I'd go with NMEA format as the default setting :) > > > yes, that would also be my preference. > > > > Arguments for/against AI2: > > > + Full functionality can be accessed from userspace (incl. A-GPS, > > > maybe raw satellite data) > > > - Userspace has to behave to have proper power management > > > - No freely (not even as in beer) tool available to fully use AI2, > > > so there will be only a real advantage after long "French Cafe" > > > sessions. > > > > Seems AI2 could be optionally enabled as needed with some writes > > to /dev/gnss0 to change the mode? > > Hmm, we have > /sys/class/gnss/gnss0/type to get the mode, maybe we add some file > to change the mode? Or having it hidden behing a module parameter > and implement something better accessible if any need arrives? The 'type' attribute is intended to reveal the GNSS receiver type (class) as a hint to user space to avoid having to detect it at runtime using heuristics. It does not reflect which mode is currently active for receivers that provide both a vendor specific protocol and NMEA (e.g. u-blox receivers). User space can currently switch modes at will by writing to /dev/gnss0 as Tony mentioned. It may or may not make sense to make sure a particular mode is set during probe, for example, if there's no real use for the proprietary protocol and everyone would just switch away from it immediately. Johan