From patchwork Thu Dec 28 03:18:40 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AceLan Kao X-Patchwork-Id: 1880692 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ubuntu.com (client-ip=185.125.189.65; helo=lists.ubuntu.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=patchwork.ozlabs.org) Received: from lists.ubuntu.com (lists.ubuntu.com [185.125.189.65]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4T0tyZ5rS1z23d7 for ; Thu, 28 Dec 2023 14:19:02 +1100 (AEDT) Received: from localhost ([127.0.0.1] helo=lists.ubuntu.com) by lists.ubuntu.com with esmtp (Exim 4.86_2) (envelope-from ) id 1rIgv2-0005KL-Aa; Thu, 28 Dec 2023 03:18:48 +0000 Received: from mail-il1-f182.google.com ([209.85.166.182]) by lists.ubuntu.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1rIgv0-0005JJ-9A for kernel-team@lists.ubuntu.com; Thu, 28 Dec 2023 03:18:46 +0000 Received: by mail-il1-f182.google.com with SMTP id e9e14a558f8ab-35fea35c4c2so10338325ab.1 for ; Wed, 27 Dec 2023 19:18:46 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1703733524; x=1704338324; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:sender:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=+9jAsynMOw+FxfxOJUkp3ZTAx8D0m1FEld9BOYjHKCU=; b=PO74qHZXZMXg4V/XrD1Nso2YbzrWUTxCWry6nyqj+rZzXTSc9rrf3BD8qZuDAvjUEd QfMn51IDBDhhTAqf7SPHUcCajBw8BUKHdV695aKnVgs8LVvPO63cuxvB91kERK09KfvD Rcm0WzhvEA8Lpf8nthDrlW0mf6R7bhWe0zj2dvJBTlenh8JG+sAJJEIumGcigWt7tmEM CUDD3U597GbZHi6bd229W/ZHEOHgVzX9nFn0oO65WH4Bf+p9JUDoy2nupNauy2kQH1I0 XA1yorknIIvquYeElE0VaSKD4e0BiSa8C1WfZeCWA2YXuspuiwgHWmh2OhC1+9gRuCQt cl0Q== X-Gm-Message-State: AOJu0YzPM3xpxBVJ7/Xh8C0C0Q/e25zPEGBpSys0/+CFQy2dUQl1Sap2 xZV7WERREGkTd9mZiJlW2/5FotByPwGIGg== X-Google-Smtp-Source: AGHT+IEy9n3wnHfS1PtcTi8mzbi9SnYUuR0Vnp4FzAM9rvkVhozjXLLqRWn5bpYEwkJnTRyBkSQ+Mw== X-Received: by 2002:a05:6e02:12e5:b0:35f:b148:c24c with SMTP id l5-20020a056e0212e500b0035fb148c24cmr11574052iln.1.1703733524363; Wed, 27 Dec 2023 19:18:44 -0800 (PST) Received: from localhost (220-135-95-34.hinet-ip.hinet.net. [220.135.95.34]) by smtp.gmail.com with ESMTPSA id h24-20020a631218000000b005c6746620cfsm11761057pgl.51.2023.12.27.19.18.43 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Dec 2023 19:18:43 -0800 (PST) From: AceLan Kao To: kernel-team@lists.ubuntu.com Subject: [PATCH 0/2][SRU][J] Add ODM driver rtc-pcf85263 Date: Thu, 28 Dec 2023 11:18:40 +0800 Message-Id: <20231228031842.1147904-1-acelan.kao@canonical.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Received-SPF: pass client-ip=209.85.166.182; envelope-from=acelan@gmail.com; helo=mail-il1-f182.google.com X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" From: "Chia-Lin Kao (AceLan)" BugLink: https://bugs.launchpad.net/bugs/2045385 [ Impact ] rtc-pcf85263 driver is needed for ODM partner [ Test Plan ] Load the driver setting the timestamp level to 0 (default to 1) : modprobe rtc-pcf85263 tsl=0 export the rtc device: echo "pcf85263 0x51" > /sys/bus/i2c/devices/i2c-1/new_device RTC device should act as a standard RTC, hwclock -r -f /dev/rtc1 #for reading hwclock -w -f /dev/rtc1 #for writing This driver has anti-tampering function. Get the current tamper timestamp: cat /sys/class/rtc/rtc1/device/timestamp1 unmount the bottom metal panel, unscrewing the 6x T-10 screws and let the anti-tampering goes in open state. The timestamp should be updated to the current time. [ Where problems could occur ] Events could occur on the I2C bus communication. Chia-Lin Kao (AceLan) (1): UBUNTU: [Config] updateconfigs for ODM drivers CONFIG_RTC_DRV_PCF85263 Filippo Copetti (1): UBUNTU: SAUCE: ODM: rtc: add PCF85263 RTC driver MAINTAINERS | 6 + debian.master/config/annotations | 1 + drivers/rtc/Kconfig | 10 + drivers/rtc/Makefile | 1 + drivers/rtc/rtc-pcf85263.c | 1784 ++++++++++++++++++++++++++++++ drivers/rtc/rtc-pcf85263.h | 387 +++++++ 6 files changed, 2189 insertions(+) create mode 100644 drivers/rtc/rtc-pcf85263.c create mode 100644 drivers/rtc/rtc-pcf85263.h Acked-by: Stefan Bader Acked-by: Roxana Nicolescu