Received: by 2002:a89:d88:0:b0:1fa:5c73:8e2d with SMTP id eb8csp2109271lqb; Mon, 27 May 2024 08:08:38 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVFndCeqgv10wxHyIdFje0j76u76oZovGMX/fyag/ssUO4Eum1j2ND3WB0lmrxNeEJTYuBHK4TehhdLl09Kl8+qogUrY75YTCbnxjqwDw== X-Google-Smtp-Source: AGHT+IHz6kP0dqne3+uAr4McPIHRi4g5VyhqfLr/RPJoBBrj5pygAQrvV9BbPXKdLBroVSGD45U+ X-Received: by 2002:a17:902:d509:b0:1f4:be9b:d30f with SMTP id d9443c01a7336-1f4be9bdadamr7287025ad.68.1716822517934; Mon, 27 May 2024 08:08:37 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716822517; cv=pass; d=google.com; s=arc-20160816; b=hnLOHTWv9U7kfQHwD6JF0o/WEDwsMNvjBJFXYLR60GtuzX/FRTC/+C/b0zUDm28zz6 nCIeMBjSZ0AOAAqhKi3crc2S7jEMgd/nXUqmW+oGMm9PFxityMckoWVOnTOUbGA90nXB MfCbJmjnYS57Lyw9BFX5fYwk9DrtM6Sc8P9wbl66Jj8uKhHU0lsFM/TR+Y62563+aSbg tfmzSacbeFeA9J5WwF2/e0qwvbUeORlP7njuO8RK6dFRIeimLEJZJ7LDQqhFSMh6Yt39 vsLXvVbAX2Rg7ow4Rq2KMKKxgaLVtVrWwDsY8NJOGK7/j8tmWkK68tD7DP4UAwd6EnHa rHtw== 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:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=VKBL1jiOA3aAvx3p5BJnVQjWdh8f3DgBew9fnCKqXL8=; fh=n/TPdmSUKCBLA/Q8f/BTv+lKATcHqMfEaRamyNTqIc4=; b=LQ1pMCclWH1CejVHNJJu1ZqOLppM23B4JQvewaKGcRe7MSJYpp3ags57NThxM8WqSe JwIpi0QprIuKpbsE/0JZbEtFAp2tviVtaW+2Cl5zePSKupY3M+OdMIDjcJNgNV6eLRuy lUJiWT7UZ5IggOZ6DHHoE2gK8aBS39sZBT95npjV24oqrCzd1xiiKpAjcYR1pNsvTzXb miOhXzHODEE6tYrxekanICCnlnIRCPizwkfoQujkv6Sm51lzeSzNkbqxgCe/kc7eX7lS kHCUKoK5j82IGypYSkyCiT8fvQx+zyak17q5eFIX7032JC1uS5Mp9EGRNLG1CAaLMzh3 M3mw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b="Vzh25/BI"; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-190968-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-190968-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id d9443c01a7336-1f44ee26bb8si57954455ad.406.2024.05.27.08.08.37 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 May 2024 08:08:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-190968-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b="Vzh25/BI"; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-190968-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-190968-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com 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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 6598928F5E6 for ; Mon, 27 May 2024 14:58:55 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id BD03F172BDB; Mon, 27 May 2024 14:26:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Vzh25/BI" Received: from mail-wm1-f46.google.com (mail-wm1-f46.google.com [209.85.128.46]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 41F61172BCB; Mon, 27 May 2024 14:26:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.46 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716819989; cv=none; b=proyMpDWT1jtWkg6f6RHE7+a+6dWaHBD6VZJJnf/3fFxBQQdhHOfTb/YcSJQ9mpQxZN2IWTKe+0fXaBVpdFClv3+zJK2VIoNqGdb6juZf+E0wfHEHz8LGUGLWQuhMVx2LYAU/WIz2AI9XFgAgeVJ2VI/WA8lzdn3kHBb3gVRLfQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716819989; c=relaxed/simple; bh=ZlwyzcB9bhnoWgMAnmPiA5mWO6l8sdiIHNU8T7/gj/Q=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=Sl8mUQpwp9VYoaGNsPdpNKQMBERu6W1VdF1R1Mf6kgr45QfzEgAGOMepFMRzqLC3M1H5QbEaM4fVqgPJMoSU+ntMg3qgBqdnQTJ7HGBMPWqaHFoUuj93m1TU3mFQkgTBHe4fZrnHIdLYSrajuGP+rFuxoIY90QzlyvZDwUuGehk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=Vzh25/BI; arc=none smtp.client-ip=209.85.128.46 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-wm1-f46.google.com with SMTP id 5b1f17b1804b1-420180b5898so79655055e9.2; Mon, 27 May 2024 07:26:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1716819986; x=1717424786; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=VKBL1jiOA3aAvx3p5BJnVQjWdh8f3DgBew9fnCKqXL8=; b=Vzh25/BIFyn2lZ4PXuVm/zGT5wccjVl/510w/p4KHdcacMogpXqXfZRoFW2DolFIph 9GpxvidDufdyalUBACbSc7vK6JGIwLoIjBgSg0vDtZs/X1q8rzD2t2cmkGZJ6QaEP1j7 9HjstpuR6E7RrwJ0FP4lXNvMnSqJkYN+nXatfwN+FOEeKjbiqbA0R/jpQUhLVxa90gc9 do8M+R3Ry/Kd27S8DQa9Ood4ejUmo3KGeHAWSYFHayHMfBHKePXzXUBRtl5tW07WGE3f WxfhLaOiMkFPqd3pDrut/upSrQ22jGlc9d2EnNl9swarTaNFZez3Eu4NFBKcNIHwwfth QKLQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716819986; x=1717424786; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=VKBL1jiOA3aAvx3p5BJnVQjWdh8f3DgBew9fnCKqXL8=; b=SSgIurd+OenVC7xMo44fg4Kawf8K/UG0SliN44sSbCdB/FQGIXnVdb2MUMbhGlRrhe zSRv552rgtHVjobQL89AV07MRuhMPNtZ0SlcZ1GQ7IbguT3D7oHgrVMrsSodjtCuxIdr 7V7oylq5jKN6mpgVs4x8LGSb6aaPzwt5Dx0jmHofhdlUSTVQXuSF9f5hI9NpLSL+Q1j+ 30GWNOMMlWkJKU9kaZZ16wYXDc3/WnR2bmF8kyEOzEfk+gdEowyLcT4kzzcoQ/gRdQDu TLfn2ggiaiNND0dWevlBatfT7F8nEDMaD8dqpLZfVzSef855yPnqABwM0ymPrfTmyTdI S+DQ== X-Forwarded-Encrypted: i=1; AJvYcCXe3DnOHr6P3ltIEPqpUDwNn82PtYBnGp4WMKc5G+DIteR1X2u7OcnZCS96EqRtrhw/5qY6qvHPPDUaei34MtcRg/gcJmZ0hkR5XyxqPyCSGowfJA4I+EwJg3LRIJR2T6cZA7XMAQ== X-Gm-Message-State: AOJu0YxVoIkHmnmvT+4KWgw0HERjZz8nG7vP6gtAGl+R8mdZHOD1Abin xqYVvmuWN5EertRF9X+CdPhM5VSGVv9NQQusLXbUTLXEULIuqXMp/5G+G56lZcg= X-Received: by 2002:a7b:cb19:0:b0:418:6138:6777 with SMTP id 5b1f17b1804b1-42108a00005mr84052045e9.31.1716819985959; Mon, 27 May 2024 07:26:25 -0700 (PDT) Received: from rbolboac.. ([2a02:2f0e:350b:4500:9c9:f6ef:e79b:45ce]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-421089ae976sm110537875e9.38.2024.05.27.07.26.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 May 2024 07:26:25 -0700 (PDT) From: Ramona Gradinariu To: linux-kernel@vger.kernel.org, jic23@kernel.org, linux-iio@vger.kernel.org, devicetree@vger.kernel.org, conor+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, robh@kernel.org, nuno.sa@analog.com Cc: Ramona Gradinariu Subject: [PATCH v5 2/9] drivers: iio: imu: Add support for ADIS16501 Date: Mon, 27 May 2024 17:26:11 +0300 Message-Id: <20240527142618.275897-3-ramona.bolboaca13@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240527142618.275897-1-ramona.bolboaca13@gmail.com> References: <20240527142618.275897-1-ramona.bolboaca13@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Add support for ADIS16501 device in already existing ADIS16475 driver. Reviewed-by: Nuno Sa Signed-off-by: Ramona Gradinariu --- no changes in v5 drivers/iio/imu/Kconfig | 4 ++-- drivers/iio/imu/adis16475.c | 23 +++++++++++++++++++++++ 2 files changed, 25 insertions(+), 2 deletions(-) diff --git a/drivers/iio/imu/Kconfig b/drivers/iio/imu/Kconfig index 52a155ff3250..782fb80e44c2 100644 --- a/drivers/iio/imu/Kconfig +++ b/drivers/iio/imu/Kconfig @@ -36,8 +36,8 @@ config ADIS16475 select IIO_ADIS_LIB_BUFFER if IIO_BUFFER help Say yes here to build support for Analog Devices ADIS16470, ADIS16475, - ADIS16477, ADIS16465, ADIS16467, ADIS16500, ADIS16505, ADIS16507 inertial - sensors. + ADIS16477, ADIS16465, ADIS16467, ADIS16500, ADIS16501, ADIS16505, + ADIS16507 inertial sensors. To compile this driver as a module, choose M here: the module will be called adis16475. diff --git a/drivers/iio/imu/adis16475.c b/drivers/iio/imu/adis16475.c index 01f55cc902fa..53872b716f4a 100644 --- a/drivers/iio/imu/adis16475.c +++ b/drivers/iio/imu/adis16475.c @@ -661,6 +661,7 @@ enum adis16475_variant { ADIS16467_2, ADIS16467_3, ADIS16500, + ADIS16501, ADIS16505_1, ADIS16505_2, ADIS16505_3, @@ -980,6 +981,25 @@ static const struct adis16475_chip_info adis16475_chip_info[] = { .flags = ADIS16475_HAS_BURST32 | ADIS16475_HAS_BURST_DELTA_DATA, .adis_data = ADIS16475_DATA(16500, &adis1650x_timeouts), }, + [ADIS16501] = { + .name = "adis16501", + .num_channels = ARRAY_SIZE(adis16477_channels), + .channels = adis16477_channels, + .gyro_max_val = 1, + .gyro_max_scale = IIO_RAD_TO_DEGREE(40 << 16), + .accel_max_val = 1, + .accel_max_scale = IIO_M_S_2_TO_G(800 << 16), + .temp_scale = 100, + .deltang_max_val = IIO_DEGREE_TO_RAD(720), + .deltvel_max_val = 125, + .int_clk = 2000, + .max_dec = 1999, + .sync = adis16475_sync_mode, + /* pulse sync not supported */ + .num_sync = ARRAY_SIZE(adis16475_sync_mode) - 1, + .flags = ADIS16475_HAS_BURST32 | ADIS16475_HAS_BURST_DELTA_DATA, + .adis_data = ADIS16475_DATA(16501, &adis1650x_timeouts), + }, [ADIS16505_1] = { .name = "adis16505-1", .num_channels = ARRAY_SIZE(adis16477_channels), @@ -1482,6 +1502,8 @@ static const struct of_device_id adis16475_of_match[] = { .data = &adis16475_chip_info[ADIS16467_3] }, { .compatible = "adi,adis16500", .data = &adis16475_chip_info[ADIS16500] }, + { .compatible = "adi,adis16501", + .data = &adis16475_chip_info[ADIS16501] }, { .compatible = "adi,adis16505-1", .data = &adis16475_chip_info[ADIS16505_1] }, { .compatible = "adi,adis16505-2", @@ -1513,6 +1535,7 @@ static const struct spi_device_id adis16475_ids[] = { { "adis16467-2", (kernel_ulong_t)&adis16475_chip_info[ADIS16467_2] }, { "adis16467-3", (kernel_ulong_t)&adis16475_chip_info[ADIS16467_3] }, { "adis16500", (kernel_ulong_t)&adis16475_chip_info[ADIS16500] }, + { "adis16501", (kernel_ulong_t)&adis16475_chip_info[ADIS16501] }, { "adis16505-1", (kernel_ulong_t)&adis16475_chip_info[ADIS16505_1] }, { "adis16505-2", (kernel_ulong_t)&adis16475_chip_info[ADIS16505_2] }, { "adis16505-3", (kernel_ulong_t)&adis16475_chip_info[ADIS16505_3] }, -- 2.34.1