Received: by 2002:ab2:7903:0:b0:1fb:b500:807b with SMTP id a3csp1011513lqj; Mon, 3 Jun 2024 07:44:47 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWCXose3xMt3QMWLyYQX/YM6sQeLEy8yg6fwuqHSr7ADkVPrTzAki4TgKSSSWZOyQUdaRLjZ902IAobbbcHzEw1CZfv9nTkIvVDdZCcrw== X-Google-Smtp-Source: AGHT+IELrKK1otcr8xVq/laxbAH4KJDx3++34bY4Ohrd3oVJDdQaFc1h+LdW/5Rbwy3c+HJ78Vb5 X-Received: by 2002:a05:622a:1820:b0:43f:fd01:bb89 with SMTP id d75a77b69052e-43ffd01c638mr129665951cf.34.1717425886775; Mon, 03 Jun 2024 07:44:46 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717425886; cv=pass; d=google.com; s=arc-20160816; b=bekERtnkWaBrEA6DSseLoA4D9QEDMKU1Ag5zdwT3o9YjrtNTQhG1BQcrLpdB0cNNu2 BzDxrn6clVbN4lY/RhgLabp27IhIYF6/ZnONcWPpGFK8YfT6idqPIHQIMNEPY71iV399 peJyKG5dt3yMzvgPPYgMwEIsKmd50pCuziLHgdXuAYTRqiTJ0L3Dp/cbeXAl1HIQP7T/ rVMa4gxZVjHBYqllhmnTIFhMGixIV4pP+YlR2XQRNkyl3P9SlarIsjxyzCXtqpCgQOol TSkJbdFWph5gp0DR0NvFMCW3IQMwXFMIDvxjkBLwNUK4XNrK3p6J736sJIa9n6Z8zTxk TY/Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:to:from :dkim-signature; bh=brF7VvD3tRd3wTM6Hl6zpzwjSLrm8R+002hZn2Vpoiw=; fh=XiJfjSFyRm5tGTtOT2sw9gKCQj2gMqw2SDumfkMcVDA=; b=kQ/rx9f8x3XuXbQ08hxK0CmJeTVp9kGagef+ZC0jRG+c2yjE3K5taJ1fGs/JTJ7TvM nnOmAyy02Ki5LYt6fU6H6yGci5tVqg0A1ltdFG1ZVjbWvh+x+PVhCwsR01MXf6whjbOH q5fSsU9UvGsix+/sWAKRoilYKZiHuB7xFJulaL8KICycCF1RSWwoETzEth2ZOFRHfFV6 wPVCHJHrjTE3LQq3+zBcbg3zME1TndeGG8oQpNSQpRoLFLZiC1APaEpceWFh2ETWHdEJ 0Tzey/1McPdljk8IJM1LqiPy/uOf4yYSe0GxNyfIW1K/vV73CZxGhh4fG2C4GfMC0Jwq raSQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=fail header.i=@kemnade.info header.s=20220719 header.b="pp7Ap/yp"; arc=pass (i=1 spf=pass spfdomain=kemnade.info dkim=pass dkdomain=kemnade.info); spf=pass (google.com: domain of linux-bluetooth+bounces-5080-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-bluetooth+bounces-5080-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id d75a77b69052e-43ff259d020si80759791cf.569.2024.06.03.07.44.46 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 03 Jun 2024 07:44:46 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-bluetooth+bounces-5080-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=fail header.i=@kemnade.info header.s=20220719 header.b="pp7Ap/yp"; arc=pass (i=1 spf=pass spfdomain=kemnade.info dkim=pass dkdomain=kemnade.info); spf=pass (google.com: domain of linux-bluetooth+bounces-5080-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-bluetooth+bounces-5080-linux.lists.archive=gmail.com@vger.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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 7E1B61C21792 for ; Mon, 3 Jun 2024 14:44:46 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1E8F112FF9D; Mon, 3 Jun 2024 14:44:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=kemnade.info header.i=@kemnade.info header.b="pp7Ap/yp" X-Original-To: linux-bluetooth@vger.kernel.org Received: from mail2.andi.de1.cc (vmd64148.contaboserver.net [161.97.139.27]) (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 F1E6984A35; Mon, 3 Jun 2024 14:44:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=161.97.139.27 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717425871; cv=none; b=EGplKHKqCvCi8UP/HvGedj/rHtcw/otAgDKurbV1IVjJ6eucZbsQcnMdSuPgR5Yc8CI/GlQBVwbTLgMNejfwaDWF0ETupTuYy0cdCKn7g5e0I3Hc7f4ZJRZ++U0Igxgkzcgx3Ho69ksJhm42IKGnVQE47aR4nXnui/DHrDMpsZg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717425871; c=relaxed/simple; bh=LL9VTFcQkhlxWV1L/jgrJeTOtwYRWbP06bumMRDRhSI=; h=From:To:Subject:Date:Message-Id:MIME-Version; b=hJ+heJ+m0cwkPpfc22loE0z4SSJ5iPYefRrSfLLKiLVCAZg3IQXRXOJ7hSJWmFOcISbxKHGgv8/eBS7I/nHgDYnnTdKqfXKlNJBz8AeGboh7oF17qOFoRd/PaBncdv1NF9uxxL61dIruUshgcx44yml+69LawLnO22i+1xUiPBA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=kemnade.info; spf=pass smtp.mailfrom=kemnade.info; dkim=pass (2048-bit key) header.d=kemnade.info header.i=@kemnade.info header.b=pp7Ap/yp; arc=none smtp.client-ip=161.97.139.27 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=kemnade.info Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=kemnade.info Received: from mail.andi.de1.cc ([2a02:c205:3004:2154::1]) by mail2.andi.de1.cc with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1sE8v6-008hAf-2v; Mon, 03 Jun 2024 16:44:22 +0200 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=kemnade.info; s=20220719; h=Content-Transfer-Encoding:MIME-Version: Message-Id:Date:Subject:To:From:Sender:Reply-To:Cc:Content-Type:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=brF7VvD3tRd3wTM6Hl6zpzwjSLrm8R+002hZn2Vpoiw=; b=pp7Ap/yptWDGmByh3o0em4Bf5E wO8c3Y/RAUi+KuVxRdTqJRWyATtsTGB3OP8db3xSbMqK7hR2yJGhXRHWcxbWF9F7pIYC/mNGvi+Ez CSRINYpOz+DJd1FEJKx17YXgJyYJ59frgrZcFPmibd6u+6wWZa7FOVYpWkHNmWlnDJ/D/OdavGbWo 5sru4wx1+jlgeBGstFCzZ8RGjW93MTEQS9C0llNO+cQMd/PqwPsTevI0v5WqCWTesrkZrbNSaNv0C ICX7BFTj6VY0+WxyxwyKB3c3FSPwH7K6ti2/NcmMMAWqTMTOYvdNMmRrvXYCsDL2EKLMP1TGFSCxx 3DYVgRlQ==; Received: from p200300c20737c2001a3da2fffebfd33a.dip0.t-ipconnect.de ([2003:c2:737:c200:1a3d:a2ff:febf:d33a] helo=aktux) by mail.andi.de1.cc with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1sE8v2-002UeY-2a; Mon, 03 Jun 2024 16:44:18 +0200 Received: from andi by aktux with local (Exim 4.96) (envelope-from ) id 1sE8v3-009DAi-1F; Mon, 03 Jun 2024 16:44:17 +0200 From: Andreas Kemnade To: marcel@holtmann.org, luiz.dentz@gmail.com, johan@kernel.org, gregkh@linuxfoundation.org, jirislaby@kernel.org, andreas@kemnade.info, pmenzel@molgen.mpg.de, linux-kernel@vger.kernel.org, linux-bluetooth@vger.kernel.org, Adam Ford , Tony Lindgren , tomi.valkeinen@ideasonboard.com, =?UTF-8?q?P=C3=A9ter=20Ujfalusi?= , robh@kernel.org, hns@goldelico.com Subject: [PATCH v3 0/4] bluetooth/gnss: GNSS support for TiWi chips Date: Mon, 3 Jun 2024 16:43:56 +0200 Message-Id: <20240603144400.2195564-1-andreas@kemnade.info> X-Mailer: git-send-email 2.39.2 Precedence: bulk X-Mailing-List: linux-bluetooth@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Some of these chips have GNSS support. In some vendor kernels a driver on top of misc/ti-st can be found providing a /dev/tigps device which speaks the secretive Air Independent Interface (AI2) protocol. To be more compatible with userspace send out NMEA by default but allow a more raw mode by using a module parameter. This was tested on the Epson Moverio BT-200. Changes since V2: - Optimize waits - Fix some packet analysis / checksum computation issue - Adding a proposal for removing those waits as RFC - Minor spell corrections and improved descriptions Changes since V1: - Set up things for NMEA output - Powerup/down at open()/close() - split out logic between drivers/bluetooth and drivers/gnss - leave out drivers/misc/ti-st driver removal to avoid filling up mailboxes during the iterations, this series is still a proof that it is not needed, will take the brush after this series is accepted. Andreas Kemnade (4): gnss: Add AI2 protocol used by some TI combo chips. Bluetooth: ti-st: Add GNSS subdevice for TI Wilink chips gnss: Add driver for AI2 protocol gnss: ai2: replace long sleeps by wait for acks drivers/bluetooth/hci_ll.c | 81 +++++ drivers/gnss/Kconfig | 13 + drivers/gnss/Makefile | 3 + drivers/gnss/ai2.c | 560 +++++++++++++++++++++++++++++++++++ drivers/gnss/core.c | 1 + include/linux/gnss.h | 1 + include/linux/ti_wilink_st.h | 8 + 7 files changed, 667 insertions(+) create mode 100644 drivers/gnss/ai2.c -- 2.39.2