From patchwork Tue Dec 17 17:30:00 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dzmitry Sankouski X-Patchwork-Id: 851566 Received: from mail-ej1-f53.google.com (mail-ej1-f53.google.com [209.85.218.53]) (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 B89BE1F8696; Tue, 17 Dec 2024 17:30:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.53 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734456640; cv=none; b=S4WDVK/QlHC1CHAJjl6DUjp3rP7mdyKAmRuD1ot2gH2fWFFcunpTE6rNAAOLbLkzoNaAmlqUfkvaIDdGTRtXwiK9njm0BQx1ub8dLNkNraaIoZFYzW4lpOnGVQGku439QVpteYLTLxrrOz8abvBEvGuvGerSjPMWqSfc2r+rBdg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734456640; c=relaxed/simple; bh=Ysdm0MPXNFcWymQ1oyL7kJl3xM+8vynFf2bNEkduhGY=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=TNQNjhW24mxy4sG3uPn4Tj8y0M2dIZRhVq5KiZB4KW9BbS3OQ2YVvDcgkF65SNXXIoYAPyCys79bcCA/vkNnV7oK4+3Y/c88BNM6NEobbeDRbYrWYzhC+5iNxc2Nl48iNdG2xsjWg6tNH1LqKg4sTaKq9CHB5ZFDAg25hRTYrLQ= 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=AXsAMxZv; arc=none smtp.client-ip=209.85.218.53 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="AXsAMxZv" Received: by mail-ej1-f53.google.com with SMTP id a640c23a62f3a-aa69107179cso1034747366b.0; Tue, 17 Dec 2024 09:30:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1734456637; x=1735061437; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=Cz+dnEpOOSJD4rTGFvNS16veou5VGvcPUuKa01+C17g=; b=AXsAMxZv1P/DfilUZTqGPNTX8DVnpVrlN28hhYHFJsoVc/UeMVmPtr8O5qcNwwLohJ XnyCCLa1xBgts9CC5XSO9p8APkgmVukh6TepcrdLqJ+zH4/R656Sm2BcJnnayVeMQ7km H76luKodFa1yd+vCHqNq8FZb2Zvbpi2ypMvtRRfbuu+xm17UjbM6vXotHDQCWkUMMHeD +J4XHI4dS+4nLdkZpQ1Ol2mutBP6cE8d+j7raou9hPX03U/GL2SPjAJuWtDzCAKaaupQ inRICrWpldwFkksZtp58/QdG2uVL3IfvI+dwV00qlZdb4e/JBM0zATOOZd6iyUDzqL9Y zDPA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734456637; x=1735061437; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Cz+dnEpOOSJD4rTGFvNS16veou5VGvcPUuKa01+C17g=; b=bcbMHqIcNXv6MTUsl8+l9+aCtyLLNdTaGCdOTuwSRtbrAOGd6+bqMIEdg1J/CcvUD8 /tTZJcdu/kLHDvqvVeUwtG2g4v0Nf492FDZy46i3WomUrMe7uYv9d8GigmCHaL7P5dFm 1CCA+Mk8kA7MPY2giFhJzXtBwnW7XqH6atRhd6s21ytz4WOHX9vg9/OSOcuxVTOvS05X farbCSxixM8ZuI7rXhwJ96sHeoY7Dq4/WQ7FQmiOIDCjXl52d00hnW21IU/XsBqDKPGJ /IjW0Kl+lNyBQbzh00ITmnWi9V9LyUrQVoediQpUuGKK57kazb014vQPWy2gLSU5buLf f7XA== X-Forwarded-Encrypted: i=1; AJvYcCV9yXs9UHqzxCbOfbHWmj4nQC477K2GjoXeU4wX9hwEHr76c6QFHOt7UuvAx7Fe4q1HvUCv0kqwlbOrVxLW@vger.kernel.org, AJvYcCVQOEM4Bnim0f+CyWdDHlwEiD5ZNis2M+UWKTVZwPa7HWq+GqrnjoKJiR3N5NKTCxYRKxPAdEXH/3bS@vger.kernel.org, AJvYcCVbaDsm6KBQJ/4ACFqOWL4ujkeYIE6dpmreducD5rkTveVbHFzX69k4+hSVWRTmOpx+xiQoDfBfQMS927w=@vger.kernel.org, AJvYcCWO5UC+XLkG7jurjWR8BUkIUj40ryz/BTI8Zss8swZAwD80k6B8HsSM7YnCoJ9/Alu0ra1IcbSpHpi27Q==@vger.kernel.org X-Gm-Message-State: AOJu0YwjcrFsuvz2Q9Q3Fs1XU0ZD8a6CgPmOnw7Zfdnx0Dz6B2TzfDZf HHVC03+Ecf4FJ1wqKfrma149e5Gur/A/JWphwG6NIEvoOnChd47j X-Gm-Gg: ASbGncvN1O1G472VpKkXjUM70Eeb8kW4+JkrA2ERlip7xrMwEa8v3KpLCwfh3ge6ZvK 3R35Ru5Edmd4UHy0iJELoH6UlWrT2Q8gBArX5v223+MPcqS9ApeJZmH1iD14q3iRPWymz9t9jYe W234c6Pza0j/qzpVwu1UjGoEIqAFFdXLIpVjPLLz4uf9reVaBXsVWy7QU5XtrzmBukBX30SpPpm 56PbOd7YmiSX8fiGzD4thpwTWTJuDS71gbpyPN1X5UTdElYFrzK6+M= X-Google-Smtp-Source: AGHT+IGwmz9YnrEkFF8KJaxjIXYmB5yyVIVxDSOSbE4ZkDUdZr0/8ybnU98EgeGum7+g1K9/fJchlg== X-Received: by 2002:a17:907:7290:b0:aa6:a7cb:4b9e with SMTP id a640c23a62f3a-aab778d9d91mr2038215266b.1.1734456636690; Tue, 17 Dec 2024 09:30:36 -0800 (PST) Received: from [127.0.1.1] ([46.53.242.72]) by smtp.googlemail.com with ESMTPSA id a640c23a62f3a-aab95d813afsm470444166b.0.2024.12.17.09.30.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 Dec 2024 09:30:36 -0800 (PST) From: Dzmitry Sankouski Date: Tue, 17 Dec 2024 20:30:00 +0300 Subject: [PATCH v12 02/11] dt-bindings: power: supply: max17042: split on 2 files Precedence: bulk X-Mailing-List: linux-leds@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20241217-starqltechn_integration_upstream-v12-2-ed840944f948@gmail.com> References: <20241217-starqltechn_integration_upstream-v12-0-ed840944f948@gmail.com> In-Reply-To: <20241217-starqltechn_integration_upstream-v12-0-ed840944f948@gmail.com> To: Sebastian Reichel , Chanwoo Choi , Krzysztof Kozlowski , Lee Jones , Rob Herring , Conor Dooley , Dmitry Torokhov , Pavel Machek , Hans de Goede , Marek Szyprowski , Sebastian Krzyszkowiak , Purism Kernel Team , Krzysztof Kozlowski Cc: linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-input@vger.kernel.org, linux-leds@vger.kernel.org, Dzmitry Sankouski X-Mailer: b4 0.14.0 X-Developer-Signature: v=1; a=ed25519-sha256; t=1734456632; l=5442; i=dsankouski@gmail.com; s=20240619; h=from:subject:message-id; bh=Ysdm0MPXNFcWymQ1oyL7kJl3xM+8vynFf2bNEkduhGY=; b=HNp31paxlevWLqOZGpyGyV9rCN9EiCyf9tWLkAlifleRTF3H4WY3mjsOzqRQ/Hw3wM7p1m3Wk iRt2P46qoemDnnf2ObbY/dcU+5mUmvMtXaPOidlTH+opOG43+jJb0U9 X-Developer-Key: i=dsankouski@gmail.com; a=ed25519; pk=YJcXFcN1EWrzBYuiE2yi5Mn6WLn6L1H71J+f7X8fMag= Move max17042 common binding part to separate file, to reuse it for MFDs with platform driver version. Signed-off-by: Dzmitry Sankouski Changes on v12: - add addtionalProperties: true on common file - rename *-base file to *-common - remove compatibles from shared shema - move required properties to final schema - remove max77705 compatible from binding - it will be used in mfd77705 binding --- Documentation/devicetree/bindings/power/supply/maxim,max17042-common.yaml | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ Documentation/devicetree/bindings/power/supply/maxim,max17042.yaml | 43 +++---------------------------------------- MAINTAINERS | 2 +- 3 files changed, 58 insertions(+), 41 deletions(-) diff --git a/Documentation/devicetree/bindings/power/supply/maxim,max17042-common.yaml b/Documentation/devicetree/bindings/power/supply/maxim,max17042-common.yaml new file mode 100644 index 000000000000..67e673ca7970 --- /dev/null +++ b/Documentation/devicetree/bindings/power/supply/maxim,max17042-common.yaml @@ -0,0 +1,54 @@ +# SPDX-License-Identifier: GPL-2.0 +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/power/supply/maxim,max17042-common.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Maxim 17042 fuel gauge series + +maintainers: + - Sebastian Reichel + +allOf: + - $ref: power-supply.yaml# + +properties: + interrupts: + maxItems: 1 + description: | + The ALRT pin, an open-drain interrupt. + + maxim,rsns-microohm: + $ref: /schemas/types.yaml#/definitions/uint32 + description: | + Resistance of rsns resistor in micro Ohms (datasheet-recommended value is 10000). + Defining this property enables current-sense functionality. + + maxim,cold-temp: + $ref: /schemas/types.yaml#/definitions/uint32 + description: | + Temperature threshold to report battery as cold (in tenths of degree Celsius). + Default is not to report cold events. + + maxim,over-heat-temp: + $ref: /schemas/types.yaml#/definitions/uint32 + description: | + Temperature threshold to report battery as over heated (in tenths of degree Celsius). + Default is not to report over heating events. + + maxim,dead-volt: + $ref: /schemas/types.yaml#/definitions/uint32 + description: | + Voltage threshold to report battery as dead (in mV). + Default is not to report dead battery events. + + maxim,over-volt: + $ref: /schemas/types.yaml#/definitions/uint32 + description: | + Voltage threshold to report battery as over voltage (in mV). + Default is not to report over-voltage events. + + power-supplies: true + +additionalProperties: true + diff --git a/Documentation/devicetree/bindings/power/supply/maxim,max17042.yaml b/Documentation/devicetree/bindings/power/supply/maxim,max17042.yaml index 085e2504d0dc..0832aa5f5eb0 100644 --- a/Documentation/devicetree/bindings/power/supply/maxim,max17042.yaml +++ b/Documentation/devicetree/bindings/power/supply/maxim,max17042.yaml @@ -10,7 +10,7 @@ maintainers: - Sebastian Reichel allOf: - - $ref: power-supply.yaml# + - $ref: maxim,max17042-common.yaml# properties: compatible: @@ -24,48 +24,11 @@ properties: reg: maxItems: 1 - interrupts: - maxItems: 1 - description: | - The ALRT pin, an open-drain interrupt. - - maxim,rsns-microohm: - $ref: /schemas/types.yaml#/definitions/uint32 - description: | - Resistance of rsns resistor in micro Ohms (datasheet-recommended value is 10000). - Defining this property enables current-sense functionality. - - maxim,cold-temp: - $ref: /schemas/types.yaml#/definitions/uint32 - description: | - Temperature threshold to report battery as cold (in tenths of degree Celsius). - Default is not to report cold events. - - maxim,over-heat-temp: - $ref: /schemas/types.yaml#/definitions/uint32 - description: | - Temperature threshold to report battery as over heated (in tenths of degree Celsius). - Default is not to report over heating events. - - maxim,dead-volt: - $ref: /schemas/types.yaml#/definitions/uint32 - description: | - Voltage threshold to report battery as dead (in mV). - Default is not to report dead battery events. - - maxim,over-volt: - $ref: /schemas/types.yaml#/definitions/uint32 - description: | - Voltage threshold to report battery as over voltage (in mV). - Default is not to report over-voltage events. - - power-supplies: true - required: - - compatible - reg + - compatible -additionalProperties: false +unevaluatedProperties: false examples: - | diff --git a/MAINTAINERS b/MAINTAINERS index 81348dbce8ca..0816fe0f3c80 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -14164,7 +14164,7 @@ R: Sebastian Krzyszkowiak R: Purism Kernel Team L: linux-pm@vger.kernel.org S: Maintained -F: Documentation/devicetree/bindings/power/supply/maxim,max17042.yaml +F: Documentation/devicetree/bindings/power/supply/maxim,max17042*.yaml F: drivers/power/supply/max17042_battery.c MAXIM MAX20086 CAMERA POWER PROTECTOR DRIVER From patchwork Tue Dec 17 17:30:02 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dzmitry Sankouski X-Patchwork-Id: 851565 Received: from mail-ej1-f49.google.com (mail-ej1-f49.google.com [209.85.218.49]) (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 3DA081F8ADF; Tue, 17 Dec 2024 17:30:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.49 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734456643; cv=none; b=TUiHlU6hEB5mqnLQdyXeI2gxZr5dwF+Dj3f4aDAHk+PZI4Jpap+wo2m7JJHhw2/iFonhdbyzKYt7VJesbjAMdXfgj3tCLVfsATyH5bywKUgfDnWRlIYHfOl2zuw+UVMrXz3RQL309/r1OB83esVynBHWEtZ1jtU1j2jaT4MzdIc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734456643; c=relaxed/simple; bh=m/prkZca79DAlfiiiu1BVx+1KofCiOIkNU49AA2iruk=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=H7yrWY95LDrWk3x/5HqspWFVH4ew4Soizi/+nta91UdDJeYIWolf2sQ3WNpknBqzfNMN6KaDjQ7scj/igdgUv42oObulcmWsc75BJ/lkp1ts2jwl5Odsw7qSkbXGiFBsHzs0pDLCNCEOcPxsyjtpnJtPLwpxXNaVAg0b6L7lcB0= 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=fdeRJR5h; arc=none smtp.client-ip=209.85.218.49 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="fdeRJR5h" Received: by mail-ej1-f49.google.com with SMTP id a640c23a62f3a-aab6fa3e20eso795986566b.2; Tue, 17 Dec 2024 09:30:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1734456640; x=1735061440; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=vZuCH1LtCnuis9NiU0vyHp/qhWwCsXWkEnPZSwSkxTA=; b=fdeRJR5hi+0bMgrh7ecuhKPXQyp9e13wFYciFUBLJV30FbGaQpd5fMhUOFhbqxuNAe 1vfORLUN1Czub53rXCyrWeWoQXgqaQIBfENtsL1MkJOIHLPblMFf2184Idru4bc2UyOt 1vJsN4FafeYuXMbp043ndA9pO2se3CP8ELgeMnTCmgZkIlRunPvQkHUP9JJpFJywuWq0 SXNObQV++9V26SShyN3Ca6JWyNgBEJ5eSsNQ1S9Rrv7zTbRUe9KGYxn5Ky5Pu5fGPYHY jkFqr0LR5uegCw1wrplxp8cCMLMN48xKzQN5LVi0Zr2K6QxvhmMxAZ0bnOV2+VxirfEB h1Fw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734456640; x=1735061440; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=vZuCH1LtCnuis9NiU0vyHp/qhWwCsXWkEnPZSwSkxTA=; b=RWlv0WqXCqMJIJ2MXGvPePmMqOK+V08IcGh1ixyaZtEkUOX3NC2oO5ivh7r8hji4Yd dM39/ghPfM2cE0LbuQsxLrkh60lsi0UlfK88Ifu269YLMi12OtUdiwtRP0aeH2kMDLDy gFHPRcFxSINK2VZh/yXeb695eGhCMOOfcw3k0AtZcF+3JheAKHNTyViqn/qxufNYB+aX jHqFr3fEsU2C+JFlWdweqWEvxe5hyGm+czWK4Kdfc+Vy4s9TRzSPMUwMw4q5cZwwkGOX jEdTcU411+ZFy1nupgVTOBMrw8P972Vkj+O+1kV6gWO0S8madtRepRCWdNZGqqgijCIq l+aQ== X-Forwarded-Encrypted: i=1; AJvYcCUYf3j1PkzfmTbl2g3SlmBSW4UiO5gSi9osI11d0pUevAC0LvMMiefbDZAB2E3qK9f66kWzSLZemJB+Jw==@vger.kernel.org, AJvYcCW/Ae0tZXu6M6D8PHr8ZSpJR+icP51uEbTzQTHM0cOX94Ka/aBixcT9Jg75paPksP4wH7izXds1w2tg@vger.kernel.org, AJvYcCWfRHugH8JaCQ5gSc44ILEnz6X0fQ6bOziJHWSvhElA/FJC/Iu0FtguTFQsiU+jyZLz5jmxGC9DhDPZsa2n@vger.kernel.org, AJvYcCXXsUUV10MD6v9OonPAIwl5TdkdHAkaHckkGteZFzStmTn39zOVMX/YIG5d0mBW7zteioGEkkmVYVXp2XE=@vger.kernel.org X-Gm-Message-State: AOJu0YxdgXMu7kS4Psk9UA5tT5si4kMTNkwyNHcsX+SkYVXA99fZyu5M Od6YW9zeTxJfX6UGAdhLaEXlVLoX60QsmBtHc8FcfBdrklw3DCRf X-Gm-Gg: ASbGncvRqO6sAP+JLUsLgXW61N5PLciQFpGzo4qeUUJK0nVJqxieQsA0LY7w/sKMa/V bt9swSh76wHGcIsQWr/xS/1pzejCGQ3Xa8U958oqAtspLbCAE8S0LqU/SJVqZtOLdMLqJXnOgm9 zSeCUZIexl6gI+MzXf4PjgB0U4ScweX3RqHcDPXoNjryNjAGYoPta72yFlb9/K++0+5d4oT6c/A Qr3wvLpgj5b6fCUn8Ma/pvRL+TlH1thKwSwIlKpcm0SeALvGFafms4= X-Google-Smtp-Source: AGHT+IFbl1t6QkoO2tti1kssbTrzYKE4NxkeremULCMcMWnAIQQfH3roCqYU8OtSTTYLiNccjJgh4w== X-Received: by 2002:a17:907:1c0b:b0:aa6:7c36:3423 with SMTP id a640c23a62f3a-aab778bf059mr1355828366b.1.1734456639330; Tue, 17 Dec 2024 09:30:39 -0800 (PST) Received: from [127.0.1.1] ([46.53.242.72]) by smtp.googlemail.com with ESMTPSA id a640c23a62f3a-aab95d813afsm470444166b.0.2024.12.17.09.30.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 Dec 2024 09:30:39 -0800 (PST) From: Dzmitry Sankouski Date: Tue, 17 Dec 2024 20:30:02 +0300 Subject: [PATCH v12 04/11] dt-bindings: mfd: add maxim,max77705 core Precedence: bulk X-Mailing-List: linux-leds@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20241217-starqltechn_integration_upstream-v12-4-ed840944f948@gmail.com> References: <20241217-starqltechn_integration_upstream-v12-0-ed840944f948@gmail.com> In-Reply-To: <20241217-starqltechn_integration_upstream-v12-0-ed840944f948@gmail.com> To: Sebastian Reichel , Chanwoo Choi , Krzysztof Kozlowski , Lee Jones , Rob Herring , Conor Dooley , Dmitry Torokhov , Pavel Machek , Hans de Goede , Marek Szyprowski , Sebastian Krzyszkowiak , Purism Kernel Team , Krzysztof Kozlowski Cc: linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-input@vger.kernel.org, linux-leds@vger.kernel.org, Dzmitry Sankouski X-Mailer: b4 0.14.0 X-Developer-Signature: v=1; a=ed25519-sha256; t=1734456632; l=6563; i=dsankouski@gmail.com; s=20240619; h=from:subject:message-id; bh=m/prkZca79DAlfiiiu1BVx+1KofCiOIkNU49AA2iruk=; b=vMVMTIUoA2A2hyCzw5De4IiuHs7+/OARq0jHwyt58g9WargsGCuAcJhmn1m8LAru4/LXhFkIF bT+t72wVmXEBkenRciWnWDaQqkaz78qOaNmUDP/9o/DzWAuXNQ1VXn/ X-Developer-Key: i=dsankouski@gmail.com; a=ed25519; pk=YJcXFcN1EWrzBYuiE2yi5Mn6WLn6L1H71J+f7X8fMag= Add maxim,max77705 binding part, containing leds controller and haptics. Signed-off-by: Dzmitry Sankouski --- Changes in v12: - move fuelgauge bindings to separate patch because separate device - move charger bindings to separate patch because separate device - description: mention this is a part Changes in v11: - remove reviewed tags because of major changes - none of children are supposed to have addresses, all nodes are unit-less Changes in v10: - leds: replace label with color and function properties - leds: add support for leds-class-multicolor - move fuelgauge node to patternProperties "^fuel-gauge@[0-9a-f]+$" to comply with max17042 binding Changes in v9: - replace max77705 fuel gauge with max17042 - remove monitored battery because not supported by max17042 Changes in v8: - fix leds compatible Changes in v6: - unevaluatedProperties must be false - drop excessive sentence from description, just describe the device - change leds compatible to maxim,max77705-rgb Changes in v5: - formatting changes - add unevaluatedProperties: false for nodes referencing common schemas - remove additionalProperties on nodes with unevaluatedProperties: false - add min and max to led index Changes in v4: - change dts example intendation from tabs to spaces - remove interrupt-names property - remove obvious reg description - split long(>80) lines --- Documentation/devicetree/bindings/mfd/maxim,max77705.yaml | 166 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ MAINTAINERS | 1 + 2 files changed, 167 insertions(+) diff --git a/Documentation/devicetree/bindings/mfd/maxim,max77705.yaml b/Documentation/devicetree/bindings/mfd/maxim,max77705.yaml new file mode 100644 index 000000000000..c1db861a2d38 --- /dev/null +++ b/Documentation/devicetree/bindings/mfd/maxim,max77705.yaml @@ -0,0 +1,166 @@ +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/mfd/maxim,max77705.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Maxim MAX77705 Companion Power Management and USB Type-C interface + +maintainers: + - Dzmitry Sankouski + +description: | + This is a part of device tree bindings for Maxim MAX77705. + + Maxim MAX77705 is a Companion Power Management and Type-C + interface IC which includes charger, fuelgauge, LED, haptic motor driver and + Type-C management. + +properties: + compatible: + const: maxim,max77705 + + "#address-cells": + const: 1 + + "#size-cells": + const: 0 + + reg: + maxItems: 1 + + interrupts: + maxItems: 1 + + haptic: + type: object + additionalProperties: false + + properties: + compatible: + const: maxim,max77705-haptic + + haptic-supply: true + + pwms: + maxItems: 1 + + required: + - compatible + - haptic-supply + - pwms + + leds: + type: object + additionalProperties: false + description: + Up to 4 LED channels supported. + + patternProperties: + "^led@[0-3]$": + type: object + $ref: /schemas/leds/common.yaml# + unevaluatedProperties: false + + properties: + reg: + maxItems: 1 + + required: + - reg + + properties: + compatible: + const: maxim,max77705-rgb + + "#address-cells": + const: 1 + + "#size-cells": + const: 0 + + multi-led: + type: object + $ref: /schemas/leds/leds-class-multicolor.yaml# + unevaluatedProperties: false + + properties: + "#address-cells": + const: 1 + + "#size-cells": + const: 0 + + patternProperties: + "^led@[0-3]$": + type: object + $ref: /schemas/leds/common.yaml# + unevaluatedProperties: false + + properties: + reg: + maxItems: 1 + + required: + - reg + + required: + - compatible + +required: + - compatible + +additionalProperties: false + +examples: + - | + #include + #include + + i2c { + #address-cells = <1>; + #size-cells = <0>; + + pmic@66 { + compatible = "maxim,max77705"; + reg = <0x66>; + interrupt-parent = <&pm8998_gpios>; + interrupts = <11 IRQ_TYPE_LEVEL_LOW>; + pinctrl-0 = <&chg_int_default>; + pinctrl-names = "default"; + #address-cells = <1>; + #size-cells = <0>; + + leds { + compatible = "maxim,max77705-rgb"; + + multi-led { + color = ; + function = LED_FUNCTION_STATUS; + #address-cells = <1>; + #size-cells = <0>; + + led@1 { + reg = <1>; + color = ; + }; + + led@2 { + reg = <2>; + color = ; + }; + + led@3 { + reg = <3>; + color = ; + }; + }; + }; + + haptic { + compatible = "maxim,max77705-haptic"; + haptic-supply = <&vib_regulator>; + pwms = <&vib_pwm 0 50000>; + }; + }; + }; diff --git a/MAINTAINERS b/MAINTAINERS index 0816fe0f3c80..75e4e122bb44 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -14234,6 +14234,7 @@ B: mailto:linux-samsung-soc@vger.kernel.org F: Documentation/devicetree/bindings/*/maxim,max14577.yaml F: Documentation/devicetree/bindings/*/maxim,max77686.yaml F: Documentation/devicetree/bindings/*/maxim,max77693.yaml +F: Documentation/devicetree/bindings/*/maxim,max77705*.yaml F: Documentation/devicetree/bindings/*/maxim,max77843.yaml F: Documentation/devicetree/bindings/clock/maxim,max77686.txt F: drivers/*/*max77843.c From patchwork Tue Dec 17 17:30:04 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dzmitry Sankouski X-Patchwork-Id: 851564 Received: from mail-ej1-f53.google.com (mail-ej1-f53.google.com [209.85.218.53]) (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 891F81F9409; Tue, 17 Dec 2024 17:30:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.53 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734456645; cv=none; b=jX2Q2oFLoC4TB5fggu7QO3nUzvTKgUH7qosvL/K3iwmkyWmLFMpB3XP89P0g0irxaNKcb580GI9uNiyQnH8RJlpU2HCYhg2mkOW/lTdvBDPHrl8lgfOguGorr5J7waiEfsYNY3JZ/39Yvhr+/a1GwrTcSGRx4Z6Bkvgq/pmkv+s= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734456645; c=relaxed/simple; bh=ov88MZvaoV/gsvJQTFMLzJ21tbwH+Yq0QbAua0kHSkY=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=Bir6l7mbV2MHQQBXSAw+yRuDPXfxLGYTPSfHL9T6cYndzb7fyqBuhSs1uoWY/0sH/YBDB9Gh5pAvjqIifAGvKy24sAWiPbVBY3H9IOzHwFLGiU+cR22uppZhhJP3r3QYT1VaAgQf232V7JdC8cqR5TMy+awyWlC/Icri8Htavzo= 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=LTE8IGJD; arc=none smtp.client-ip=209.85.218.53 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="LTE8IGJD" Received: by mail-ej1-f53.google.com with SMTP id a640c23a62f3a-aa692211331so1039877166b.1; Tue, 17 Dec 2024 09:30:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1734456642; x=1735061442; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=QL0NB4wZEOA9rq/xLXkLm9tFDuVeVMes+GSNBIWRSr4=; b=LTE8IGJDPobQ4VRuMszeu2hqMEX9BEXIwuzLGeRdnBD1lBWn+WqbtSV+igORQ36kiJ mmu3kGGbnVPGOm2QAL4OCojLQzW2pBMZoRRBJloaQ8gI7j2ij2O65jQnO7hWDVkdoMei 0RYqDxvsZapoS0DQdLExQkFE99SsHtcObo2rrtPkNgjVhsIthPZXFzR2eFcjh8F6oA0L HkhETa3MZWO4O60x505jhwp457N46aO69o0M0Aqoo+Y3k62OZ5KFLAB5I4G8F6KlfNfJ xFb7E3jukdX6DJvI+K1vXWCWgtLF7u69dl+EazphkwGcY2YlZY7g7EnccCHAZm+pSLmh gdTw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734456642; x=1735061442; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=QL0NB4wZEOA9rq/xLXkLm9tFDuVeVMes+GSNBIWRSr4=; b=V7ILn7/tFxN/R/lQVR23DWDB0X3eKRkXhT2ztIfNXsCdz/mjImMOieZ1x19u2q1a9Z E/diLUpE44aqFYsBg8vEvrMbsy4T2bjb5bbdm0sCMnGteLzDH7WW/DiYpHal+H6wIHG5 MJKBDcBCza+a+joC8AZvLvUHvns7w2NzjlOpxYUeAapbV+lsvcHyJGBDV208ccu0ewdH MbpR1DPlIwLfKb/jSBJeprh4vzzjF9lTpMcqxQuTzHn5R6OowjaZGkxqj/btN5aszZ7R /fKzMuDYWQNzCXF66g53G33iD/arjryeFMrLFkFvhkETly/z30ze1xsNqx7HyedbHGuT AAbg== X-Forwarded-Encrypted: i=1; AJvYcCVG2Nss89IoxNRiQ5eO45ABKhXYNGCUPS2tzUEPKXHJKWlbREmshFWtYn1xLHc9+T2/sWs0nr0ZW0fHzsVT@vger.kernel.org, AJvYcCVYNOVY4jrJQMF8BlCfZwcwvi6fiuklWWbJLCTx3wKVQXcMXR2e4I3I2QInMdkwUyrkHTMHSaPXU8yJ@vger.kernel.org, AJvYcCWgQhl5l+W8e/4hvDFrdoY7wj6RtrBk8wvPJhBKV1DTKsL0xBlaIzOFBrsXXN+7PCOkf/9T7MaR62oUiQ==@vger.kernel.org, AJvYcCX5bbcC83lpbJStP9RPJ1davZq4SngF/EEuQ5DoZ5NnoiupyTR++KY7Wey/SQmMUEAG6eogDdeTrON9AT4=@vger.kernel.org X-Gm-Message-State: AOJu0Yz22LiLjn+mjdIIQ2GjPLLkLm5Z8i1tHMayhiEU7MR52p3uGazP QREtjsXwYogoaxvz5+HviRPlyZ4KEIAQNSUIBUJYi4VvDl3h2mqL X-Gm-Gg: ASbGncuIReuHJUnsOWAPn8KgrbxEdr7DW9iJEb0Yw3k8Fn9Jy/zY3JQjd9Q6JEz6Jt1 Gmy5RiBZVoL2FkoURxqvc/WqWap9sn+g+KnalfPOp+Xm5RJUQCDZl7KuXfvPa7SYe4hzqFAoIpN +k2argLu/SxppPx2pN6FcwzWXO6uqN+aFq7AWb48YIsDxLki07lKN0hWLIuoUfprgPQiwoNYSzt BBie8K2NXkABfyJuHVuEbgYNDqB4/mCiB/+1ucn7c1FvyYOTCPcjXw= X-Google-Smtp-Source: AGHT+IEtHTtnPcyrOy04wnZ4nQ2TcNi89mpKpHr0ALzOfO/hQ7Cw7ZfU+4vHa/HDAKoQUWhCvctoLg== X-Received: by 2002:a17:906:32d9:b0:aa6:79c0:d8ce with SMTP id a640c23a62f3a-aabdc8815b8mr359015466b.1.1734456641773; Tue, 17 Dec 2024 09:30:41 -0800 (PST) Received: from [127.0.1.1] ([46.53.242.72]) by smtp.googlemail.com with ESMTPSA id a640c23a62f3a-aab95d813afsm470444166b.0.2024.12.17.09.30.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 Dec 2024 09:30:41 -0800 (PST) From: Dzmitry Sankouski Date: Tue, 17 Dec 2024 20:30:04 +0300 Subject: [PATCH v12 06/11] power: supply: max17042: add max77705 fuel gauge support Precedence: bulk X-Mailing-List: linux-leds@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20241217-starqltechn_integration_upstream-v12-6-ed840944f948@gmail.com> References: <20241217-starqltechn_integration_upstream-v12-0-ed840944f948@gmail.com> In-Reply-To: <20241217-starqltechn_integration_upstream-v12-0-ed840944f948@gmail.com> To: Sebastian Reichel , Chanwoo Choi , Krzysztof Kozlowski , Lee Jones , Rob Herring , Conor Dooley , Dmitry Torokhov , Pavel Machek , Hans de Goede , Marek Szyprowski , Sebastian Krzyszkowiak , Purism Kernel Team , Krzysztof Kozlowski Cc: linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-input@vger.kernel.org, linux-leds@vger.kernel.org, Dzmitry Sankouski X-Mailer: b4 0.14.0 X-Developer-Signature: v=1; a=ed25519-sha256; t=1734456632; l=1366; i=dsankouski@gmail.com; s=20240619; h=from:subject:message-id; bh=ov88MZvaoV/gsvJQTFMLzJ21tbwH+Yq0QbAua0kHSkY=; b=0+R8VqdXHH5BDKIxbGZ1rR+AbmiM4f5fColan0su7Tb8PoYmIyTe4o6MdkgCFrqC66LOA6RKz sQK6pkyEtUCBVwrs1eypTudcUz+4rnMvbB8wVgPaBNcvNf+3rP5uehU X-Developer-Key: i=dsankouski@gmail.com; a=ed25519; pk=YJcXFcN1EWrzBYuiE2yi5Mn6WLn6L1H71J+f7X8fMag= Add max77705 fuel gauge support. Signed-off-by: Dzmitry Sankouski --- Changes in v12: - add only to platform version IDs Changes in v11: - add device type to compatible Changes in v10: - keep alphabetical order --- drivers/power/supply/max17042_battery.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/power/supply/max17042_battery.c b/drivers/power/supply/max17042_battery.c index 9424c1c108e3..a254967eef1b 100644 --- a/drivers/power/supply/max17042_battery.c +++ b/drivers/power/supply/max17042_battery.c @@ -1233,6 +1233,8 @@ static const struct of_device_id max17042_dt_match[] __used = { .data = (void *) MAXIM_DEVICE_TYPE_MAX17050 }, { .compatible = "maxim,max17055", .data = (void *) MAXIM_DEVICE_TYPE_MAX17055 }, + { .compatible = "maxim,max77705-battery", + .data = (void *) MAXIM_DEVICE_TYPE_MAX17047 }, { .compatible = "maxim,max77849-battery", .data = (void *) MAXIM_DEVICE_TYPE_MAX17047 }, { }, @@ -1255,6 +1257,7 @@ static const struct platform_device_id max17042_platform_id[] = { { "max17047", MAXIM_DEVICE_TYPE_MAX17047 }, { "max17050", MAXIM_DEVICE_TYPE_MAX17050 }, { "max17055", MAXIM_DEVICE_TYPE_MAX17055 }, + { "max77705-battery", MAXIM_DEVICE_TYPE_MAX17047 }, { "max77849-battery", MAXIM_DEVICE_TYPE_MAX17047 }, { } }; From patchwork Tue Dec 17 17:30:06 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dzmitry Sankouski X-Patchwork-Id: 851563 Received: from mail-ej1-f48.google.com (mail-ej1-f48.google.com [209.85.218.48]) (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 C51F11F9EBB; Tue, 17 Dec 2024 17:30:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.48 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734456648; cv=none; b=fNTPEwem7Z6UE12Pi16pV8f8wFHnorqC5RToJ1aJld/hjnRWMz23HtAKj507AzgBFSLL9dHOYd5G3g8hod/05T17CZ6XaQczRzt9BCdIRAoo5ZdI/WyfFBRKGEeraR0xJ4MreqBOmQFOrFdufTjsowoiG3D84xp+OTLTY0OeTa4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734456648; c=relaxed/simple; bh=+FFiRlSo99k/2BJM4fC8uS16GzJJXvxO8BQM/0zU0VA=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=I+8PKJuXDFM11zf4dMcKOCCKFQEUmO95LRybOsQb20gPRsuMyzcdt3m+3CmARjTyoildiX8ciSQj6weFqDZm7WACHmvwEvzXGVPly6oCgVtOTJDN9mfRg4pqnwusLyvGQqGEvQXn9ma7Mx4f6Og0T4G775Xs+t6kRgVvJi3xq9U= 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=acxmSJJ3; arc=none smtp.client-ip=209.85.218.48 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="acxmSJJ3" Received: by mail-ej1-f48.google.com with SMTP id a640c23a62f3a-aa684b6d9c7so918384966b.2; Tue, 17 Dec 2024 09:30:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1734456645; x=1735061445; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=6LqDPKMP8x/bUFI6SrSGeUk5x3byOylHQFv08vPFx6w=; b=acxmSJJ3VHL3aOyn9omp/W4ZMECKOKru94+nFh6A6xBgLk6DNHfHkJ81mIHGM1fCXO Z6cbvtkFyUn5hhp50LVj+3vi7L48W1vvpY8XfZdGr2eMp0CjxzWXQkHkPJqr36C3biup zknIw2NOfLk17Sb/rtqX35TlRNV8ai/RY/i865ZHL5RxeWNMN+G2QTY4qU1vm4hWeaUU dNuS9BiBlI8bbVcGC3JK5MEehH9VdqmPd9S1msKO8s26uzUa2ysQIJyE4ocdUNBfeA7k oJXuITwliBxs56eQix0B5Em7joK2bRZDIFI8d8sJBcJLzHy47hs1+0S7vdyi49oTke3q KLoQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734456645; x=1735061445; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=6LqDPKMP8x/bUFI6SrSGeUk5x3byOylHQFv08vPFx6w=; b=SXJrC4bvz7R/CtxzBB6nlzrUpeRYGof0nuoriciA2wjideHJsAvOEPkpdCLrqm9Lmb pICa8B//D870BMW4OcQpuPlqlizJlytILD0VelVaVb7TCPgfJvH4CX3pKXIsSg+FjDsF TXRUmSV3i1mahqOq2ur3hpCF8M4YlbdTRmFlbDOGqjFS0zMk992SmHtGtQ4lpLdW0usF WqmSpCL28iasTAPBkcnFTy3CxIh3oPYypC6zyDQ8GKsYt8FNYsAWEulujdzexwp4OLeD k6DheMR3Gd4Sgl9Y9VbwVS8vq5zmgQv+iZM8ESaWLxKAPJjzRUEqP30KZbq7v1kK3sNm eRnA== X-Forwarded-Encrypted: i=1; AJvYcCULPIC4bI623PPHFv3w8tdS1lirkCfLCXykFgmIglhRPBrkpOCQR9rA0JxjDMCN0VeIzNn/assa9C+iD3Q=@vger.kernel.org, AJvYcCVV7rl2UFoUSJu0pc9yFmdsE9IySFKRbTYWYoUPuqvtYgSfOSuoIbv6Ywiz/PhECGY69zcXAkwuGm/5/R16@vger.kernel.org, AJvYcCWAXQXG5HvUroLuiTlAAvhQg07TDa+oZ279vnYYrs4ippr6GnN+aWwNwG/K+nby8YpflwQFfwKZbroP/g==@vger.kernel.org, AJvYcCX8LxGjNUJmKS5ssfAZLK5emAYNrVr96a6j9GOGae+T/gjm0rjmJyHLZ7jPIX63W1HHluqpVvPB20Ry@vger.kernel.org X-Gm-Message-State: AOJu0YzEPwI/LSp9semewNzj7AycDa0sVmK/GSXoeyppdMiUA6rCyeu/ cZPyH55xonmhaSQH/BCnsSQMrFlG/VelI1lIbM17ERHg3KjXDGDfQvqSbg== X-Gm-Gg: ASbGncuKC/DrCjgPs9fHa458kz6oYncKFgrlO6d9ZdaeOYnKJY9jGKTNR/RWctyR7EZ vljk3kImpqIv5XKY562I1kXYmDDeLH3dQrXkhqZUgdkOUjOYVEXZlTyngcMdKjYOWWzc+6PjO0n 4Cl3Qzjcdm2zBm7zwCaVAWTVqSsKd1ZWS5hdJhOcCdG9xFCUH0hRJ51Gr0KB71/QUBYyG4uWSdr Nc+r9wrcp4AI+FapIeqyD3qOoGuGW/qb6ba0G1nDpvgsNkpkLhzPB0= X-Google-Smtp-Source: AGHT+IHyJ1xzTMr00z/xVI0EuUuBw+7rjBe7/iaEUnQtszYu7MmySsEEdGvbwvxqylshhTNr7ZLyFA== X-Received: by 2002:a17:907:3f23:b0:aa6:9fad:3c1d with SMTP id a640c23a62f3a-aab77ea5969mr1931278366b.39.1734456645114; Tue, 17 Dec 2024 09:30:45 -0800 (PST) Received: from [127.0.1.1] ([46.53.242.72]) by smtp.googlemail.com with ESMTPSA id a640c23a62f3a-aab95d813afsm470444166b.0.2024.12.17.09.30.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 Dec 2024 09:30:44 -0800 (PST) From: Dzmitry Sankouski Date: Tue, 17 Dec 2024 20:30:06 +0300 Subject: [PATCH v12 08/11] mfd: simple-mfd-i2c: Add MAX77705 support Precedence: bulk X-Mailing-List: linux-leds@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20241217-starqltechn_integration_upstream-v12-8-ed840944f948@gmail.com> References: <20241217-starqltechn_integration_upstream-v12-0-ed840944f948@gmail.com> In-Reply-To: <20241217-starqltechn_integration_upstream-v12-0-ed840944f948@gmail.com> To: Sebastian Reichel , Chanwoo Choi , Krzysztof Kozlowski , Lee Jones , Rob Herring , Conor Dooley , Dmitry Torokhov , Pavel Machek , Hans de Goede , Marek Szyprowski , Sebastian Krzyszkowiak , Purism Kernel Team , Krzysztof Kozlowski Cc: linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-input@vger.kernel.org, linux-leds@vger.kernel.org, Dzmitry Sankouski X-Mailer: b4 0.14.0 X-Developer-Signature: v=1; a=ed25519-sha256; t=1734456632; l=1366; i=dsankouski@gmail.com; s=20240619; h=from:subject:message-id; bh=+FFiRlSo99k/2BJM4fC8uS16GzJJXvxO8BQM/0zU0VA=; b=rdErnLbkKIKZVkHDkkOh5Tel0i3+R4O2Q7EKdJjNVI0Ci7/Tvap+dguurlHkl5U0M3Rn1fVG/ 6Cx68MdA7jBCrdRW4tDiKhg79AA34VQcstDC7zAgjK4SkOQUwDXUDQN X-Developer-Key: i=dsankouski@gmail.com; a=ed25519; pk=YJcXFcN1EWrzBYuiE2yi5Mn6WLn6L1H71J+f7X8fMag= Add MAX77705 support - fuel gauge and hwmon devices. Hwmon provides charger input and system bus measurements. Signed-off-by: Dzmitry Sankouski --- drivers/mfd/simple-mfd-i2c.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/drivers/mfd/simple-mfd-i2c.c b/drivers/mfd/simple-mfd-i2c.c index 6eda79533208..d6563f4263dd 100644 --- a/drivers/mfd/simple-mfd-i2c.c +++ b/drivers/mfd/simple-mfd-i2c.c @@ -83,11 +83,22 @@ static const struct simple_mfd_data maxim_max5970 = { .mfd_cell_size = ARRAY_SIZE(max5970_cells), }; +static const struct mfd_cell max77705_sensor_cells[] = { + { .name = "max77705-battery", .of_compatible = "maxim,max77705-battery" }, + { .name = "max77705-hwmon", }, +}; + +static const struct simple_mfd_data maxim_mon_max77705 = { + .mfd_cell = max77705_sensor_cells, + .mfd_cell_size = ARRAY_SIZE(max77705_sensor_cells), +}; + static const struct of_device_id simple_mfd_i2c_of_match[] = { { .compatible = "kontron,sl28cpld" }, { .compatible = "silergy,sy7636a", .data = &silergy_sy7636a}, { .compatible = "maxim,max5970", .data = &maxim_max5970}, { .compatible = "maxim,max5978", .data = &maxim_max5970}, + { .compatible = "maxim,max77705-sensors", .data = &maxim_mon_max77705}, {} }; MODULE_DEVICE_TABLE(of, simple_mfd_i2c_of_match); From patchwork Tue Dec 17 17:30:08 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dzmitry Sankouski X-Patchwork-Id: 851562 Received: from mail-ej1-f51.google.com (mail-ej1-f51.google.com [209.85.218.51]) (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 54C2E1FA144; Tue, 17 Dec 2024 17:30:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.51 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734456651; cv=none; b=duOWSZaDthPd5p4sjGTBflk/Mg/ULJ6tCAPFrzQJBjiwUlfzsBnenZ7TqSJWJa2KKadzwS+Q3sw0u3Co5WCS/3VbUJv+ofEVln/qf+v9qhcM7sLEJboSJWpW+cPmsGikwCSg6Ux5OZVoMV7AuAgmO/+802ad6QvLNAeldOl1Pio= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734456651; c=relaxed/simple; bh=Rfuhafs6uHguUFNmDxE8iSnOx6rCyPiSTsSr6WCgv7Y=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=Lel8Y2LoMEqfBPSKqLa5QJjAUClv8GYaC6JdnBwNyhmiK5+3QnRyjgE5058UBxv/20Qa7wjvlrrRzbb0cXdA+nEsOMac0R5OygahrRuo5BQ0ahYv6rcJQ+Zqp3RZe/1lJqn8znCcE6388LOZ+0VqsYf47BycghbhDTFPrmDiiko= 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=gg7Cf+b1; arc=none smtp.client-ip=209.85.218.51 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="gg7Cf+b1" Received: by mail-ej1-f51.google.com with SMTP id a640c23a62f3a-aab9e281bc0so560833566b.3; Tue, 17 Dec 2024 09:30:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1734456648; x=1735061448; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=7hehp6Fk0LGkDDofz88Jg2c9t6Nm0JquDsf7Y75Rrc0=; b=gg7Cf+b1BHw2ZfMFNl3sFnJokzNJaRlOnBjBfsIqGLs0EOGdVgQl2YFj3EHNwg/tzN qnfliaHCw1sUrqJp7Y4KRC9576eTuLTMao7PUU+KW0aE8oUNDxj0HMzz2ybo7t0EYA3+ Ba2B2BQE99Uc0JE5xK+jGTP2J0CljtO5uDedc32wv8fgcDS/XA3p4r4yf1edCRqo90t4 vvOOSVGBmOJRSHgWyJA0CRE/v1o1LptxA9mlRumOK0lt3XJSaYM8kDlVbsxQ7qz8ArWA 9s2N+FFIvdndtKRQiIGxOVF2A9gRJWIqFvyACAJewzYjAByjRSPQAnT9jzzlBCMCP5/7 /6xQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734456648; x=1735061448; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=7hehp6Fk0LGkDDofz88Jg2c9t6Nm0JquDsf7Y75Rrc0=; b=MJJ3ps/nMU7h8uKE0Z/mByTKcdB9+tDNW/rctXMN0sQ9o7/tYDvEXp7LHTFf6cQFHS zjfM0s6wMCHBFL1zf+Wwgcu7gRuLxCKvqQ89oDD/66lqpIXsTtJuHKHytKgaIfq7gmDw XfjBKgQjB0oJXK/fnKqHvyxXsNKkmubhZ2HxGYAGte5zqUKDfYK3p/Xnc9B5tl8WJRHr Y3Xk5JDb5BX1ulRK3l8xsERj0VP0qKIe2Ehb6aatoZbFG87BuvTZi7AWWsdnRX5zcif0 rWsy5hueYw0qvyURtmhHgs8ykdf2hekEknLJXN0f5oCnW744EW7ucf8hUuAKRTebHic6 9IcQ== X-Forwarded-Encrypted: i=1; AJvYcCUNTH3MW/kwFFg1cPuq0FLl3RkjGc5KTsDxnRnESNzjjFiJx03obwu5H7OsIb4izAJzerNHn3g+n4Sq@vger.kernel.org, AJvYcCUjJ5V13vn/QoErUNYBkiJ/5cXzIipkNkQIVtEg9OC8eSORh0pPXbdc9vCejMtSPWuyJf2Fg9mQTlS8ljuV@vger.kernel.org, AJvYcCVpMbuxnDQ+zWyYxO+9GQcajE4ahF97UBPixzbi3DBfUE7eyqsB9EYWQ3tPBCnGk9ikAG4QNdDoRqSBmQ==@vger.kernel.org, AJvYcCWLedmw2+mVSn+Kmh/V4kjOTmx3lY2oaKlNnh/AMA1dE67oWRqWMGTmocJOGPktLhpYcsbRPh8iys/eEMQ=@vger.kernel.org X-Gm-Message-State: AOJu0YyCCVklWK0d6014T62SKdue3abtHd88EhhLaVMJ9e0BX/4RBxiI 1JYDOjlgT2lxL4kxURKanGa9Ob+uoOrtvsKDLCRmwBPSHJk62fxU X-Gm-Gg: ASbGnctPFFMGmls/ywWD+jjPet41iv5U1FXEI/Hiyz8CFZV6H3jIHxrRQAL1YHVjWqq OWU1i8EPpmfq5EG1JMu3nyMfIlozmIwT/E82DNkouFwpxp+9P/3VxG2h6Fx7wg1oYh9DCt+s/SY IpnQLfOwqDVDrxjFyvJq9DiQU+uusBt9yPQTpCFpwy+VHcnUgsOuACka/ALybHF/MfzD3eD5f9z 5i6FDi8CzgdkG5KRFs1aRw9OAcg4rXJCNcqyfffNQpW4PUfVWDfCeU= X-Google-Smtp-Source: AGHT+IEgxmMS021zWALktfW0/WeeW1O/TeJwlg8Mpo4YHkquoQmwom2gF6hwY3fps47Aoe/az9TEuQ== X-Received: by 2002:a17:907:3fa7:b0:aa6:8fed:7c15 with SMTP id a640c23a62f3a-aab77959344mr1926500066b.17.1734456647675; Tue, 17 Dec 2024 09:30:47 -0800 (PST) Received: from [127.0.1.1] ([46.53.242.72]) by smtp.googlemail.com with ESMTPSA id a640c23a62f3a-aab95d813afsm470444166b.0.2024.12.17.09.30.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 Dec 2024 09:30:47 -0800 (PST) From: Dzmitry Sankouski Date: Tue, 17 Dec 2024 20:30:08 +0300 Subject: [PATCH v12 10/11] input: max77693: add max77705 haptic support Precedence: bulk X-Mailing-List: linux-leds@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20241217-starqltechn_integration_upstream-v12-10-ed840944f948@gmail.com> References: <20241217-starqltechn_integration_upstream-v12-0-ed840944f948@gmail.com> In-Reply-To: <20241217-starqltechn_integration_upstream-v12-0-ed840944f948@gmail.com> To: Sebastian Reichel , Chanwoo Choi , Krzysztof Kozlowski , Lee Jones , Rob Herring , Conor Dooley , Dmitry Torokhov , Pavel Machek , Hans de Goede , Marek Szyprowski , Sebastian Krzyszkowiak , Purism Kernel Team , Krzysztof Kozlowski Cc: linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-input@vger.kernel.org, linux-leds@vger.kernel.org, Dzmitry Sankouski X-Mailer: b4 0.14.0 X-Developer-Signature: v=1; a=ed25519-sha256; t=1734456632; l=4280; i=dsankouski@gmail.com; s=20240619; h=from:subject:message-id; bh=Rfuhafs6uHguUFNmDxE8iSnOx6rCyPiSTsSr6WCgv7Y=; b=XrbgvSFa95p6bwek9PAO8aQ9cnnXAf8gFi0nBFP6aMUwFpFgleAa8ummKKhdWZWJ4EgjKS7hx d+Y43PyJ2BbDhb2+DjGQdpAUnj/6/JVH3VDsg5yRNeZubwLbbsq267Q X-Developer-Key: i=dsankouski@gmail.com; a=ed25519; pk=YJcXFcN1EWrzBYuiE2yi5Mn6WLn6L1H71J+f7X8fMag= Add support for haptic controller on MAX77705 Multifunction device. This driver supports external pwm and LRA (Linear Resonant Actuator) motor. User can control the haptic device via force feedback framework. Acked-by: Dmitry Torokhov Signed-off-by: Dzmitry Sankouski --- Changes in v4: - add max77705 haptic support to max77693 driver - delete max77705-haptic --- drivers/input/misc/Kconfig | 4 ++-- drivers/input/misc/Makefile | 1 + drivers/input/misc/max77693-haptic.c | 15 ++++++++++++++- 3 files changed, 17 insertions(+), 3 deletions(-) diff --git a/drivers/input/misc/Kconfig b/drivers/input/misc/Kconfig index 6a852c76331b..b4515c4e5cf6 100644 --- a/drivers/input/misc/Kconfig +++ b/drivers/input/misc/Kconfig @@ -241,11 +241,11 @@ config INPUT_MAX77650_ONKEY config INPUT_MAX77693_HAPTIC tristate "MAXIM MAX77693/MAX77843 haptic controller support" - depends on (MFD_MAX77693 || MFD_MAX77843) && PWM + depends on (MFD_MAX77693 || MFD_MAX77705 || MFD_MAX77843) && PWM select INPUT_FF_MEMLESS help This option enables support for the haptic controller on - MAXIM MAX77693 and MAX77843 chips. + MAXIM MAX77693, MAX77705 and MAX77843 chips. To compile this driver as module, choose M here: the module will be called max77693-haptic. diff --git a/drivers/input/misc/Makefile b/drivers/input/misc/Makefile index 4f7f736831ba..3e3532b27990 100644 --- a/drivers/input/misc/Makefile +++ b/drivers/input/misc/Makefile @@ -53,6 +53,7 @@ obj-$(CONFIG_INPUT_KXTJ9) += kxtj9.o obj-$(CONFIG_INPUT_M68K_BEEP) += m68kspkr.o obj-$(CONFIG_INPUT_MAX77650_ONKEY) += max77650-onkey.o obj-$(CONFIG_INPUT_MAX77693_HAPTIC) += max77693-haptic.o +obj-$(CONFIG_INPUT_MAX77705_HAPTIC) += max77705-haptic.o obj-$(CONFIG_INPUT_MAX8925_ONKEY) += max8925_onkey.o obj-$(CONFIG_INPUT_MAX8997_HAPTIC) += max8997_haptic.o obj-$(CONFIG_INPUT_MC13783_PWRBUTTON) += mc13783-pwrbutton.o diff --git a/drivers/input/misc/max77693-haptic.c b/drivers/input/misc/max77693-haptic.c index 0e646f1b257b..c3b9d33608d7 100644 --- a/drivers/input/misc/max77693-haptic.c +++ b/drivers/input/misc/max77693-haptic.c @@ -23,6 +23,7 @@ #include #include #include +#include #include #define MAX_MAGNITUDE_SHIFT 16 @@ -115,6 +116,13 @@ static int max77693_haptic_configure(struct max77693_haptic *haptic, MAX77693_HAPTIC_PWM_DIVISOR_128); config_reg = MAX77693_HAPTIC_REG_CONFIG2; break; + case TYPE_MAX77705: + value = ((haptic->type << MAX77693_CONFIG2_MODE) | + (enable << MAX77693_CONFIG2_MEN) | + (haptic->mode << MAX77693_CONFIG2_HTYP) | + MAX77693_HAPTIC_PWM_DIVISOR_128); + config_reg = MAX77705_PMIC_REG_MCONFIG; + break; case TYPE_MAX77843: value = (haptic->type << MCONFIG_MODE_SHIFT) | (enable << MCONFIG_MEN_SHIFT) | @@ -312,6 +320,9 @@ static int max77693_haptic_probe(struct platform_device *pdev) case TYPE_MAX77693: haptic->regmap_haptic = max77693->regmap_haptic; break; + case TYPE_MAX77705: + haptic->regmap_haptic = max77693->regmap; + break; case TYPE_MAX77843: haptic->regmap_haptic = max77693->regmap; break; @@ -407,6 +418,7 @@ static DEFINE_SIMPLE_DEV_PM_OPS(max77693_haptic_pm_ops, static const struct platform_device_id max77693_haptic_id[] = { { "max77693-haptic", }, + { "max77705-haptic", }, { "max77843-haptic", }, {}, }; @@ -414,6 +426,7 @@ MODULE_DEVICE_TABLE(platform, max77693_haptic_id); static const struct of_device_id of_max77693_haptic_dt_match[] = { { .compatible = "maxim,max77693-haptic", }, + { .compatible = "maxim,max77705-haptic", }, { .compatible = "maxim,max77843-haptic", }, { /* sentinel */ }, }; @@ -432,5 +445,5 @@ module_platform_driver(max77693_haptic_driver); MODULE_AUTHOR("Jaewon Kim "); MODULE_AUTHOR("Krzysztof Kozlowski "); -MODULE_DESCRIPTION("MAXIM 77693/77843 Haptic driver"); +MODULE_DESCRIPTION("MAXIM 77693/77705/77843 Haptic driver"); MODULE_LICENSE("GPL");