From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id A75AFC7618A for ; Sun, 19 Mar 2023 21:24:04 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id F407A85548; Sun, 19 Mar 2023 22:24:01 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="dvSvzj05"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 5B3B18545E; Sun, 19 Mar 2023 22:23:59 +0100 (CET) Received: from mail-pj1-x1033.google.com (mail-pj1-x1033.google.com [IPv6:2607:f8b0:4864:20::1033]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 192A085548 for ; Sun, 19 Mar 2023 22:23:56 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=judge.packham@gmail.com Received: by mail-pj1-x1033.google.com with SMTP id 6-20020a17090a190600b00237c5b6ecd7so14489726pjg.4 for ; Sun, 19 Mar 2023 14:23:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1679261034; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=BH2fA4dGX2cKzC92IhXvzRnbczyAG2vNeCSBbdmy67U=; b=dvSvzj05abHmprHcuPz3Z4+ialxdVyysoM6mXRQjZkaCuzPXbzvL0N/iKaDkf9cUdT oaN0DkC/gSrjLsQPAaFq06zsQruLYNhwjCfiNzYI64w5lmaI1vmXYDl+9S70yCyV0QeN 5kIS7ep8LONcFVBe6Eg+sDFajMecT3KbSVx1w6+5Vuh+d0Mn18Rj+5k8hZO3A/v/Q6O1 /hJSNQMgghqkgGwKOszlDDyqefDyPrLjEWtcW3eGKV64wir40iKHPNOUj383NV6kOGhF QaxyOaVFYLWV2ht3PyCMqv5AA6IFGDmaZlUhgF/G6Y+9jYcj9CQ0NFnAfkS8eAf1VKY3 yGMA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679261034; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=BH2fA4dGX2cKzC92IhXvzRnbczyAG2vNeCSBbdmy67U=; b=02nbE8oagYVuIdh4exg3ZVW62V5sazUboz2V5EC5jhFC5H2tscx+4pVRUPZDw1OsWg XGsChskjLCAo5OQk/SnVo6cncjZgWlDbMZgcKQvIWUBSpPJ5jCrKfeBVgQ/u+HJTMwW2 T9Bc2SyQd1vyIFknsB2VYJP07oWfkMEWZnRN4c08g7Cdg03s0LlLNagDG5jRCVhBPi2Z Upz7K9uuxehkD1VMEKYeua7C0XuF93b8JLInyM7Rf/H1X9tS4m2o5YvygqjOadMZ4wq+ xd2uXzuKkZcwtt67TpzZzi2IGyK4h5kk8GBU3+UAlis0k1ypSkjeTH356DXthjZtbDXK m5sg== X-Gm-Message-State: AO0yUKXVjX9PslntdndF5wfLRXFQRNLq8C8SB0g+eQJ3oO36Q2OHV/r/ yk1SXDrRMvAjV/5l6+A40Wwn6zXulE4= X-Google-Smtp-Source: AK7set+c65UHtYsKZSUqXnj559tcqx2UZGsn9cQWoGJVg/ekz3QRv9z8CD1q1dRih0KnYD692yGZ3Q== X-Received: by 2002:a17:903:32d1:b0:19f:a694:6d3c with SMTP id i17-20020a17090332d100b0019fa6946d3cmr16098649plr.55.1679261033830; Sun, 19 Mar 2023 14:23:53 -0700 (PDT) Received: from chrisp-dl.atlnz.lc ([2001:df5:b000:22:7258:28bf:27ad:5c43]) by smtp.gmail.com with ESMTPSA id x10-20020a1709027c0a00b00198f36a8941sm3176174pll.221.2023.03.19.14.23.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 19 Mar 2023 14:23:52 -0700 (PDT) From: Chris Packham To: u-boot@lists.denx.de Cc: Chris Packham , Ibrahim Tilki , Sergei Antonov , Simon Glass Subject: [PATCH v2 0/2] max313xx RTC driver Date: Mon, 20 Mar 2023 10:23:42 +1300 Message-Id: <20230319212344.1691814-1-judge.packham@gmail.com> X-Mailer: git-send-email 2.40.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean This series is based on the in-flight linux patch that is adding support for this family of RTCs to linux[1]. The u-boot driver is a bit different due to some of the differences between Linux and u-boot and I've dropped the support for hwmon and clock source functions. Where possible I've tried to keep things such that the U-Boot and Linux versions can be compared and kept in sync. For reference the datasheets are all available at https://www.analog.com/media/en/technical-documentation/data-sheets/MAX31328.pdf https://www.analog.com/media/en/technical-documentation/data-sheets/MAX31329.pdf https://www.analog.com/media/en/technical-documentation/data-sheets/MAX31331.pdf https://www.analog.com/media/en/technical-documentation/data-sheets/MAX31334.pdf https://www.analog.com/media/en/technical-documentation/data-sheets/MAX31341B-MAX31341C.pdf https://www.analog.com/media/en/technical-documentation/data-sheets/MAX31342.pdf https://www.analog.com/media/en/technical-documentation/data-sheets/MAX31343.pdf [1] - https://lore.kernel.org/all/20221108122254.1185-2-Ibrahim.Tilki@analog.com/ Changes in v2: - Add note on which Linux version this came from - Collect review from Simon - Enable in sandbox for compile testing - Note feature omissions in Kconfig - Incorporate review comments from Simon - Collect r-by from Simon Chris Packham (2): include: kernel.h: port find_closest() from Linux drivers: rtc: add max313xx series rtc driver configs/sandbox_defconfig | 1 + drivers/rtc/Kconfig | 13 ++ drivers/rtc/Makefile | 1 + drivers/rtc/max313xx.c | 459 ++++++++++++++++++++++++++++++++++++++ include/linux/kernel.h | 24 ++ 5 files changed, 498 insertions(+) create mode 100644 drivers/rtc/max313xx.c -- 2.40.0