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 48DBFC77B71 for ; Tue, 25 Apr 2023 07:57:41 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 8A315861A4; Tue, 25 Apr 2023 09:57:38 +0200 (CEST) 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="HBZFFzXk"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id D497D8619E; Tue, 25 Apr 2023 09:57:36 +0200 (CEST) Received: from mail-wm1-x32d.google.com (mail-wm1-x32d.google.com [IPv6:2a00:1450:4864:20::32d]) (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 50C7F86240 for ; Tue, 25 Apr 2023 09:57:31 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=clamor95@gmail.com Received: by mail-wm1-x32d.google.com with SMTP id 5b1f17b1804b1-3f1738d0d4cso34609955e9.1 for ; Tue, 25 Apr 2023 00:57:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1682409451; x=1685001451; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=fMwHqq+XfJgW6Q1QqmLLJO9RzHY30x//jicVUUvjm0I=; b=HBZFFzXkrWMlLqzcW2Nv8SgBQKqyUX01G9xr2BlaQxJuECmmKjpGbxtKSuL9uO47NJ 1JusWJF3LryTNbk2zVB6fnS7zJSDeyfwfKRHRcNitZSPyGUqLdvPIWaAVp+FcMIfWsNU f2qQAVDy3FNRXv3o93nWFjY3Xa7T5pLUePGXoL8b0SzAVgo61WpP5UwMpLsSZ3b7JdhU z9Th1scdON1GS98vTz4udPt8CmVaFfXwaPPdNqp37cVFJDegBWMXz/HHkY7xdG0/x9mM 7lEdywE/Is84GWswpKbC/PjaY/DYA23VC9eliDYo53eGwp+wrej4vsveQ8p0EcD1+gbP Qlug== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682409451; x=1685001451; 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=fMwHqq+XfJgW6Q1QqmLLJO9RzHY30x//jicVUUvjm0I=; b=GJ6OkmD4tgUFsJxvdheMJaIfR76Ho/Vp4AtGNKqEE4QM3s7KSQoIeV1ZWxHP/Xr6YH 9i90KoyWsibyCdokwxRi3tiiNBAF4h2TAHkNWPa6jBRbMS+Ar53DTp7x/XvLg27l/NhQ qI7VuMju5N2/9iL6J1dqw+Rpo1jQtnkCaZ48uL7Y6V8YNI3JVk5o61/xGk76UU62TQeZ 8YQsx+Tml8jOVPzQVjBn9q9RfKf5Uyo/G9TMWarV/2ZUh7aNYFaQ7NY63c5yO56sMrtQ 1y+/J1/Y5ynGVjFUkVVo3S2s0d5hIr2m7jhwNNkHDOLKp8nyXJkNjnBzipbGJtCRvyMS JNCA== X-Gm-Message-State: AAQBX9dmKokGse8TlAyhYS143KAkRFHIUHoyCHMA5Mr7Fh8KD97dn4fW H5sHNRu5M26kra7OF0vpJ7A= X-Google-Smtp-Source: AKy350ZZ+thHSxl1fos4ebJDU7rsjYVtO65KmKvYI5tDKFl/RWx3/5qgvCKlhkE3o6EBKHmSaelm4w== X-Received: by 2002:a7b:c3d2:0:b0:3ed:a80e:6dfa with SMTP id t18-20020a7bc3d2000000b003eda80e6dfamr8995969wmj.40.1682409450557; Tue, 25 Apr 2023 00:57:30 -0700 (PDT) Received: from xeon.. ([188.163.112.59]) by smtp.gmail.com with ESMTPSA id k3-20020a7bc403000000b003f1745c7df3sm14218004wmi.23.2023.04.25.00.57.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 25 Apr 2023 00:57:30 -0700 (PDT) From: Svyatoslav Ryhel To: Simon Glass , Svyatoslav Ryhel Cc: u-boot@lists.denx.de Subject: [PATCH v4 0/3] Add MAX14526 MUIC driver Date: Tue, 25 Apr 2023 10:57:19 +0300 Message-Id: <20230425075722.49186-1-clamor95@gmail.com> X-Mailer: git-send-email 2.39.2 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 MAX14526 MUIC is used by LG P880/P895 which are currently in the process of merging. MAX14526 is a powerful extcon device which has the ability to accurately determine plugged devices. In this implementation muic can be configured to represent 3 modes: CP-USB/UART and AP-USB. Unfortunately AP-UART was disabled on P880/P895. Additionally the driver configures some stuff required by the charger. Extcon class has empty platform struct and ops, all configuration is performed in the probe. Filling of struct and ops is welcomed. --- Changes from v3: - fix typo in commit title - added reviewed-by Changes from v2: - created a new simple extcon uclass Changes from v1: - used log_* instead of printf - log messages made simpler --- Svyatoslav Ryhel (3): dm: extcon: add an uclass for extcon test: Add tests for the extcon extcon: add MAX14526 MUIC support arch/sandbox/dts/test.dts | 4 + drivers/Kconfig | 2 + drivers/Makefile | 1 + drivers/extcon/Kconfig | 31 +++++++ drivers/extcon/Makefile | 7 ++ drivers/extcon/extcon-max14526.c | 151 +++++++++++++++++++++++++++++++ drivers/extcon/extcon-sandbox.c | 17 ++++ drivers/extcon/extcon-uclass.c | 16 ++++ include/dm/uclass-id.h | 1 + include/extcon.h | 19 ++++ test/dm/Makefile | 1 + test/dm/extcon.c | 21 +++++ 12 files changed, 271 insertions(+) create mode 100644 drivers/extcon/Kconfig create mode 100644 drivers/extcon/Makefile create mode 100644 drivers/extcon/extcon-max14526.c create mode 100644 drivers/extcon/extcon-sandbox.c create mode 100644 drivers/extcon/extcon-uclass.c create mode 100644 include/extcon.h create mode 100644 test/dm/extcon.c -- 2.39.2