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 05E93C7618E for ; Fri, 21 Apr 2023 07:05:24 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 241248614B; Fri, 21 Apr 2023 09:05:22 +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="eaif0L8I"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 85EC386169; Fri, 21 Apr 2023 09:05:20 +0200 (CEST) Received: from mail-wr1-x433.google.com (mail-wr1-x433.google.com [IPv6:2a00:1450:4864:20::433]) (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 48D628607B for ; Fri, 21 Apr 2023 09:05:18 +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-wr1-x433.google.com with SMTP id ffacd0b85a97d-2f625d52275so1321312f8f.3 for ; Fri, 21 Apr 2023 00:05:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1682060717; x=1684652717; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=DieapEFiOoeELwKZKKCxkLK9KSC0vPsep5Pmpz3P39U=; b=eaif0L8IadQffOrZtCK53dS9aXviJRDbMsF86aQmuC5OVIIrqjuGKylqpjP7yak9co GzUFyZN1j8zFIpASA3u+dCZTCDQ3nOSkpsQFTmLLtvQ0TbCUL3JSxHr9bi68aty1MRCq BF/NxhJER7S23K9mRt27CUZ9WsTUUT6pPXcUZtuURUYbzM58oetVccMKI1Sr9rG7w45L mPJt9I0iecdnlJJajCVeKOYaq53lhbaL4GWOoojpAxtKQtGnbBqZug6qGermiMVYGM9i dw7sBOC7yK3ooKpI1EjxmXTTPmKyoVExrdt4SAeqDS4Y55kZzP/vVf8srdVhlDr5zZdb DGbA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682060717; x=1684652717; 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=DieapEFiOoeELwKZKKCxkLK9KSC0vPsep5Pmpz3P39U=; b=bBHQBrqGdUBmdL8MLh/mzawYuhFTTfHGlFsuKDjgDczeaxSg6sZ5EIjvWq0Pa0SaoW L+TJHxB6MQVvanmPN6EY+3ajJ7CoEbLILeyIBOB4eKRQEtzjwm7/6yjFEzoOdRfc5KZP 0O3aJVyakCms8/QAFhRO+kgBjzqihgJbc2fzl2AqQ+bSRpMhYSsMQJd9P5WJzy0PHPQH n50osx7xG1hjkCcsfuRY6AtI8vb+VHcdUvrXe7LvU7BsOR1P8vzdb8cKlzMETi6KFg3N sXlxXXB6byDMEJW8vWTPT8D0/d74VD5CbJyKRwY5RlCHnJXivVWTFzo8DQSZRo0mU+Hw R/Xw== X-Gm-Message-State: AAQBX9cJJR+V4A10MhydwUIULkF9VNhTzQlTlcq4325QsMlFwpIeELFf 16YlCvEZcC2QeCXSh0WspaE= X-Google-Smtp-Source: AKy350bQjGgK2wi3uoPhtxmltI8HXgpjQmEQCUYqjn5GeBPCVncM7TH4v7cUcedhb0zDLJwDBnUIdA== X-Received: by 2002:adf:e0ca:0:b0:2f4:311:c877 with SMTP id m10-20020adfe0ca000000b002f40311c877mr3081578wri.34.1682060717550; Fri, 21 Apr 2023 00:05:17 -0700 (PDT) Received: from xeon.. ([188.163.112.59]) by smtp.gmail.com with ESMTPSA id p6-20020adfe606000000b002ff1751ec79sm3700367wrm.65.2023.04.21.00.05.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 21 Apr 2023 00:05:17 -0700 (PDT) From: Svyatoslav Ryhel To: Simon Glass , Svyatoslav Ryhel Cc: u-boot@lists.denx.de Subject: [PATCH v3 0/3] Add MAX14526 MUIC driver Date: Fri, 21 Apr 2023 10:05:01 +0300 Message-Id: <20230421070504.26035-1-clamor95@gmail.com> X-Mailer: git-send-email 2.37.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 v2: - created a new simple extcon uclass Changes from v1: - used log_* instead of printf - log messages made simpler --- Svyatoslav Ryhel (3): dm: extcom: 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.37.2