From patchwork Sat Feb 24 22:49:49 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gianluca Boiano X-Patchwork-Id: 205958 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:a81b:b0:108:e6aa:91d0 with SMTP id bq27csp1346081dyb; Sat, 24 Feb 2024 14:50:15 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWMEJEs/3oc5ZHnNi+879hXs8CB0sOvpjbaJmDQinkgi451KExTvVkoRpAzoXSyy1u72dq7tNzEqbsa2joeSjg5Co+r9A== X-Google-Smtp-Source: AGHT+IHiQ4mTZlHTd8P8gzyXzOpOnyYIlksUxocn5UpKwhaLMyonWL/TCnaW0//fsUOSEz7uVEuk X-Received: by 2002:a05:6402:f1b:b0:565:767c:ce37 with SMTP id i27-20020a0564020f1b00b00565767cce37mr3417059eda.3.1708815015381; Sat, 24 Feb 2024 14:50:15 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708815015; cv=pass; d=google.com; s=arc-20160816; b=QD0LwqGUXFjWEXoX8Mz5NIyJSRLNw0WjCtyJA2dqzQDUfMdp8/bBHKpvhfHb3QQYtF r/vj71PQiZq9Durcq/tp3R7gjgg99Z6uZ65kMGCchkR0x2kI3JgQ0UY0MU7JPXwYHnrC okurVKOBTgv0tSXa18jO65c6aAb6PzSZ7iJ0COdnsNfU2rCqa0Kdy2hG6KhFWI4jipqE Uy5ePLuH9+twOV4EqMo0z7pGfKKtHzE7e0nk2cKP52sYRmDHK3TlOF17n9V6eKdI+JiL ha3rn7i52Gs1GBHexvmuYIb9ndcGvvLfa2jVy7AJ0HWz7M8BoW0CiNFAtC9rd/cpDWwf dArw== 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:cc:to :from:dkim-signature; bh=dpglvbug8B6rz9FHKHRWvwGpjAjoa19+rytvw+mL+G8=; fh=N6Yz0QUDe8mLDvT/SBBDwP/dR47c+PnMM9T4kAJeXuw=; b=g146f/kQBEz5yxBzhI6eCRlXAwLQ4iZF1omoj3zmRv72DB13s8vhEk/WBauPWRpzTu fcB8PtDOYKJ/IeZcw4YWPtbM5GYYj5OQD1vaqJzaD2n4ljLL15R9mJqx5uspnpE7q/5n i7efYXkAb9eXh9/45b5t9TLNeW5Wa+Tx4iO5fNg3e0a8ofbtTUm4Y/vQqAa3kgNtd+VI 8PuDsc1PqLzDmpiRpIA8u12VP36qb5fGuWRlZhbrVwi3a62oYepTrpWx3vDwcmk16SmP jj11KTAP537NrVXkM0ovnuURfO65QNsqDlCi4M8X72D6Bsxp10T8UnJBU4QBm73LFn4x HgUg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=Z4n6wHvM; 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-79894-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-79894-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id m2-20020aa7c482000000b0056486d99760si756123edq.12.2024.02.24.14.50.15 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 24 Feb 2024 14:50:15 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-79894-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=Z4n6wHvM; 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-79894-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-79894-ouuuleilei=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 am.mirrors.kernel.org (Postfix) with ESMTPS id 0549F1F21906 for ; Sat, 24 Feb 2024 22:50:15 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4025B4EB31; Sat, 24 Feb 2024 22:50:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Z4n6wHvM" Received: from mail-ed1-f48.google.com (mail-ed1-f48.google.com [209.85.208.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 2C9B34C63D; Sat, 24 Feb 2024 22:49:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.48 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708814999; cv=none; b=t0EYWpFadJ+CAxMUJPKuP2QJoobke1SOFM1YBIpr9FWIfd56aGcuVg88RHd+/OGJxcBsVW+Ngh/p095UL502iQH7Rjxoj7QlGgqyf0ojD0SIpUrIbUxmkPAbS3XtNEJMtD1LbnBEpnWoCbw0tNUCHCA8e//6l+qoGxCjTXpoIh8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708814999; c=relaxed/simple; bh=+M/IcrkC4KiqVSgKEfF4MEPWWH07B+P/vlCcnh7YeNg=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=d/NJFUnPlAN+Tc5iV4vntKhCM8zqygqYQy1qiHv7+WGKXubNakfcRE1iVttw+46ArTUeSxCSqWUZi9q5aOA0KaMS1rgA5Q21CRvJcJFaBEpcfvCDnnSwIDtl5LcUkfMKVC0BSPg3UIqH6Cp9qbfzymYZ8wdV5UT2M2vs4SVguto= 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=Z4n6wHvM; arc=none smtp.client-ip=209.85.208.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 Received: by mail-ed1-f48.google.com with SMTP id 4fb4d7f45d1cf-5655c7dd3b1so2870493a12.0; Sat, 24 Feb 2024 14:49:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1708814996; x=1709419796; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=dpglvbug8B6rz9FHKHRWvwGpjAjoa19+rytvw+mL+G8=; b=Z4n6wHvMA6d83CuYaa3qrH+S2RI/fVNdzo68PIFxPKSC2Z9x851cyO049Ovfjb3LIO AC/0YUHmMI1/A/b+oPNdU81Rm7yXiQzTJ8p0urhj2Zi6gkTOLljJWtn16RdUsw/0tjV9 79FJyGV48zh9NUf5qCixQ+3k9LOqNLXEJxNe2PTshySjf12PvrFhKjDavc/US25eJdkX QgKyFQK8c9lKDVW13mkyoXBIJ+dUwe80pOqahPxHxfhbKoV7PJSVulfXIfMupT4fI18M ynd+LNclizDyxhhB/grCAfZPdiTZH0YdS/uftuA9kcpirWQCY6sgGyJBEHVhS1W8YhyU Y87g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708814996; x=1709419796; 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=dpglvbug8B6rz9FHKHRWvwGpjAjoa19+rytvw+mL+G8=; b=j1H5nkKQNOub8EpK/iJ6LrPYFrllvvUifmGk5xQUWy1kwgRf8ZgsMOIRegiksxXwNX 87Ms5RGAzRRTzzFS7RuDBqmzwbnUmTAOpa9Q/bsvl5e3sSYlkmfEz5rVAlfmXu2S8X2+ Hp75Yjz3ypTBgxeAX+UXEw5eNWb4rCQzG6357eCedzXCgYjt/w7EKWJhyoJ0wanqJHci 83SJ4rcORccxb4EcEgr8vXu3UZnP5VenHR98eglO1j6UIaE9QdIfb5xZWfpFML+xJgrP pX1D4khW8Z56PxYRk/NrYynkUeWw8IFL/RoxvBKQFk0UX4o62VHsjsN5kwTDXs1znHTe vV2A== X-Forwarded-Encrypted: i=1; AJvYcCXT4A+LP4y2gDm/+pak7blnjg4RluAJC+VEbFGUrZja7jdIRG55ztCGDM+WT2Ohdy4EPCH1r41PKnmwcs6JHPojtFtppaVo1+RWG89LgJs16ai6+aMv5QUf/a0yVS2aEPyfhFUmSPREH/Y1yG+2KDwuAfgapOudFHqcAMRSX34favy4UPFGQ57u2+3J6eXHGnKhhCoEUHYSL53o3PLAuQklnROf X-Gm-Message-State: AOJu0YwVC/aKXO/c3FYq3y3RthrIiaD54Cskzcp1eDEiahTdDe6v3A0A LBOu+WSVjzu+eV1XJTxOu+znB84dUE5hOlA53PMC4QYAsQPaCPoj X-Received: by 2002:a17:906:c9d3:b0:a3e:69ff:141f with SMTP id hk19-20020a170906c9d300b00a3e69ff141fmr2679500ejb.33.1708814996309; Sat, 24 Feb 2024 14:49:56 -0800 (PST) Received: from unknown.netbird.cloud ([37.161.229.181]) by smtp.googlemail.com with ESMTPSA id ti6-20020a170907c20600b00a431cc4bd3dsm145672ejc.182.2024.02.24.14.49.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 24 Feb 2024 14:49:55 -0800 (PST) From: Gianluca Boiano To: Pavel Machek , Lee Jones , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Bjorn Andersson , Konrad Dybcio , linux-leds@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org Cc: Gianluca Boiano Subject: [PATCH 1/3] leds: qcom-lpg: Add support for PMI8950 PWM Date: Sat, 24 Feb 2024 23:49:49 +0100 Message-ID: <20240224224951.1357644-1-morf3089@gmail.com> X-Mailer: git-send-email 2.44.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1791822413406928362 X-GMAIL-MSGID: 1791822413406928362 The PMI8950 PMIC contains 1 PWM channel Signed-off-by: Gianluca Boiano --- drivers/leds/rgb/leds-qcom-lpg.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/leds/rgb/leds-qcom-lpg.c b/drivers/leds/rgb/leds-qcom-lpg.c index 6bdc5b923f98..9467c796bd04 100644 --- a/drivers/leds/rgb/leds-qcom-lpg.c +++ b/drivers/leds/rgb/leds-qcom-lpg.c @@ -1693,6 +1693,13 @@ static const struct lpg_data pm8941_lpg_data = { }, }; +static const struct lpg_data pmi8950_pwm_data = { + .num_channels = 1, + .channels = (const struct lpg_channel_data[]) { + { .base = 0xb000 }, + }, +}; + static const struct lpg_data pm8994_lpg_data = { .lut_base = 0xb000, .lut_size = 64, @@ -1819,6 +1826,7 @@ static const struct of_device_id lpg_of_table[] = { { .compatible = "qcom,pm8941-lpg", .data = &pm8941_lpg_data }, { .compatible = "qcom,pm8994-lpg", .data = &pm8994_lpg_data }, { .compatible = "qcom,pmi632-lpg", .data = &pmi632_lpg_data }, + { .compatible = "qcom,pmi8950-pwm", .data = &pmi8950_pwm_data }, { .compatible = "qcom,pmi8994-lpg", .data = &pmi8994_lpg_data }, { .compatible = "qcom,pmi8998-lpg", .data = &pmi8998_lpg_data }, { .compatible = "qcom,pmc8180c-lpg", .data = &pm8150l_lpg_data },