Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp1808747pxp; Sat, 12 Mar 2022 23:33:10 -0800 (PST) X-Google-Smtp-Source: ABdhPJxdwEw6ZwlAPW0POJ1AfSyw7dfpXJtqeS+OBvKtyFCJ+LNECyspqyD1PVgjhlF6yHm+b8ug X-Received: by 2002:a63:e70f:0:b0:380:d919:beb with SMTP id b15-20020a63e70f000000b00380d9190bebmr14190127pgi.58.1647156790387; Sat, 12 Mar 2022 23:33:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1647156790; cv=none; d=google.com; s=arc-20160816; b=kedf1CuXiCaic8KYbg7fyOpduC0WM6UzXfHMapNy0/Mw8TRuiXcIcIn8+S7lPhng+X Rz9x2cuYlL/9fSwBuDq7DgIiSB5d1chh4wgLkUq26qXw0OZs+qG9K8ZDqdGdVelGB0nn GlolkNfWdftQZELNrjrcm9OOIYX8bOZJOwjlAjXj1xoeQ0bPXdI90db7ibwOFTxo/hqM 9yBOSbnv0GcMl1znM0y8wNueU3oFXRozH+UXIq0KoceSVgFx+EbHzZVIMrrCoLE0sm4b 2eH9rD/BFzyrPejzKR9y/Qb4Ag6GtqEZNzTnMQZ7ir98hNLMXNW9xr45LOV5ZZPQEaTb wDyA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=g1uGOM5u14MmhWi9rlkVl0ueDCnCUd0QgmfYxjyLPSc=; b=ShsR1TF7bmgKijVQ0zSAoSuIPs5Qr/9IcaQR1p9AUGIQXv+k6cBshPiMNM2SC2Uyez qsjn/uiEwGmswno0ezciQIdNdqo/YPmXacVwYMBO0mNd8dX/y+HSHLo5CqxVWkcMpOWc 2PXIs9qL862fzERgXmYaFtUdD4h3ga4G/FtG7fcbGgGiOlsfPRtbiO1x+aenPeOEk8UH cuw1Q2EZh6teksYRuvA2eD5bogjiBdUekp6fyClOoxn2ZYXrD7wT6yG8w8aDtTMb2nBr Yez8pm1d18xM4GKA7DcF6ptBPpieNTkoXWZPDNDbekj/8HdMBmRsYucEzPpugT4HrJTG 3WVA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=Z4FtFIHn; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k6-20020a17090a404600b001bd14e01f17si12415830pjg.5.2022.03.12.23.32.58; Sat, 12 Mar 2022 23:33:10 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=Z4FtFIHn; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232452AbiCLSnX (ORCPT + 99 others); Sat, 12 Mar 2022 13:43:23 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57362 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232444AbiCLSnT (ORCPT ); Sat, 12 Mar 2022 13:43:19 -0500 Received: from mail-lj1-x235.google.com (mail-lj1-x235.google.com [IPv6:2a00:1450:4864:20::235]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9F0F46A038; Sat, 12 Mar 2022 10:42:13 -0800 (PST) Received: by mail-lj1-x235.google.com with SMTP id h11so16420994ljb.2; Sat, 12 Mar 2022 10:42:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=g1uGOM5u14MmhWi9rlkVl0ueDCnCUd0QgmfYxjyLPSc=; b=Z4FtFIHnrBs7Bo7clCb9t3fLwNx468Jj88pgZxP6sJMo4S5aiVj+ZE5Q+0kJ280rS1 zY3T8SzGFrB72+A4x9ZSpSql4Zn1C8waUytrhkahQQ/70zNjQuARP3r+UR/TDMQCUI0E a/0N71LoJpc5yEZ3btQw1d+EvlNst37lVk8hnFEJfZxEcTeP1xbFI3AC//OeLNpdrhKY AajyDBgEzz3XkJ+iMEobjGjCDi084v0vQKqFrCH7EHk5Mc/wH6hsZwJOaM+fMK5ukaLX 1h3j0RiaW7/Jxhzq4ip9HyrG8/tlEzvbYivJpENh+ekzTGEMZzTI8vWYxCEF+US6iTFg ydiQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=g1uGOM5u14MmhWi9rlkVl0ueDCnCUd0QgmfYxjyLPSc=; b=m35IyY40/oSDOIyGbSc5C+DtGkJoNkOSkPBt6cOU3pzP48bz/UUgko7zM2F8SA4+NY RosyuAUXeiHSec+EOGy5eAeXCZ8b2svgNxNnfjjQqN3sry0SxNzZhZ5UC8GL2m8kMQQM ff+8PvFMg2xBGnA+TG8S2DTEt60vNyaCIF1YGd5xI/hDXIkOnXD3ff3qCvgwIEiQmsWO bFmTkS0oXS0msALp9i61ZkQcMSgjgxyMtuJwT3xz6rdEYIIxW8dHgNC6T2Vyh3guZmmJ g5SrILHNuAnITVCN/rkuCuPLSXD5jlF4+rit3pjxxxI9cH9hDQH5YmZdLJyHhRsdVMKB pIFA== X-Gm-Message-State: AOAM532Gr1SbizDaSeBpQMC21CQp4m4eIBahj21XlG06gIRIDrBkAjym yGC7GvhEDhl0e6jI4cmdt/+WYHIq44LiO0zV X-Received: by 2002:a05:651c:a08:b0:247:eb2e:fb04 with SMTP id k8-20020a05651c0a0800b00247eb2efb04mr9442297ljq.524.1647110531727; Sat, 12 Mar 2022 10:42:11 -0800 (PST) Received: from localhost.localdomain ([194.39.226.133]) by smtp.gmail.com with ESMTPSA id b1-20020ac247e1000000b0044842b76861sm2311236lfp.140.2022.03.12.10.42.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 12 Mar 2022 10:42:11 -0800 (PST) From: Markuss Broks To: linux-kernel@vger.kernel.org Cc: phone-devel@vger.kernel.org, ~postmarketos-upstreaming@lists.sr.ht, Markuss Broks , MyungJoo Ham , Chanwoo Choi , Rob Herring , Krzysztof Kozlowski , devicetree@vger.kernel.org Subject: [PATCH v1 2/2] extcon: sm5502: Add support for SM5703 Date: Sat, 12 Mar 2022 20:41:54 +0200 Message-Id: <20220312184156.24912-3-markuss.broks@gmail.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220312184156.24912-1-markuss.broks@gmail.com> References: <20220312184156.24912-1-markuss.broks@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org SM5703 is another MFD from Silicon Mitus which has a very similar MUIC unit to the one in SM5502. The only difference I've noticed is slightly different configuration only enables the interrupts which are exactly the same as on SM5502. If we make use of different interrupts in the future, this can be improved by having a separate struct for SM5703, but the main functionality (detecting cable or OTG adapter) is working properly. Signed-off-by: Markuss Broks --- drivers/extcon/Kconfig | 2 +- drivers/extcon/extcon-sm5502.c | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/extcon/Kconfig b/drivers/extcon/Kconfig index 0d42e49105dd..88a8b3d7d78a 100644 --- a/drivers/extcon/Kconfig +++ b/drivers/extcon/Kconfig @@ -156,7 +156,7 @@ config EXTCON_RT8973A from abnormal high input voltage (up to 28V). config EXTCON_SM5502 - tristate "Silicon Mitus SM5502/SM5504 EXTCON support" + tristate "Silicon Mitus SM5502/SM5504/SM5703 EXTCON support" depends on I2C select IRQ_DOMAIN select REGMAP_I2C diff --git a/drivers/extcon/extcon-sm5502.c b/drivers/extcon/extcon-sm5502.c index 93da2d8379b1..17a40c3782ee 100644 --- a/drivers/extcon/extcon-sm5502.c +++ b/drivers/extcon/extcon-sm5502.c @@ -798,6 +798,7 @@ static const struct sm5502_type sm5504_data = { static const struct of_device_id sm5502_dt_match[] = { { .compatible = "siliconmitus,sm5502-muic", .data = &sm5502_data }, { .compatible = "siliconmitus,sm5504-muic", .data = &sm5504_data }, + { .compatible = "siliconmitus,sm5703-muic", .data = &sm5502_data }, { }, }; MODULE_DEVICE_TABLE(of, sm5502_dt_match); @@ -830,6 +831,7 @@ static SIMPLE_DEV_PM_OPS(sm5502_muic_pm_ops, static const struct i2c_device_id sm5502_i2c_id[] = { { "sm5502", (kernel_ulong_t)&sm5502_data }, { "sm5504", (kernel_ulong_t)&sm5504_data }, + { "sm5703", (kernel_ulong_t)&sm5502_data }, { } }; MODULE_DEVICE_TABLE(i2c, sm5502_i2c_id); -- 2.35.1