From mboxrd@z Thu Jan 1 00:00:00 1970 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 B0BD8C77B73 for ; Thu, 20 Apr 2023 16:23:55 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 56E3D8605E; Thu, 20 Apr 2023 18:23:53 +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="kPPk6wIX"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id C0C07863AF; Thu, 20 Apr 2023 18:23:50 +0200 (CEST) Received: from mail-ej1-x62e.google.com (mail-ej1-x62e.google.com [IPv6:2a00:1450:4864:20::62e]) (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 86B4485F0E for ; Thu, 20 Apr 2023 18:23:48 +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-ej1-x62e.google.com with SMTP id dm2so7618452ejc.8 for ; Thu, 20 Apr 2023 09:23:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1682007828; x=1684599828; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=v0AU0gQr/TlKSWzyc9TH4fnGLPzk/caMMfN0PqmRSGY=; b=kPPk6wIXQWwLegcCFnbatlqFsz825YLCXdvb0fTGYU63lcq0ylYsulN0HGJ/vMfWP2 LJ3U+7zrdzd3JdFmqAbGBQYK+se+hs7VY6Sp94x307uMx/OPrOxfocycqyIKdAU/tzps /e+OZZ3TgHnaX04ECn7Wv3bByO1b2HLDvBqWF2HTs1TLFqZxYQy/d0HVhYsMCkTeVvmH nFYnoWw8H56kHi9RbRcMUV7cU8FxwhfmzfvFh/KqHsLLZM58eA9LeHUtN0o7H5tLM/Np XabBAf+cOkS+D5LzccZOHerPm5n3jJ4Der/G+KkA8G9o5xX8Jr6Zgp1x5pbc7BI/+IwS 7zPg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682007828; x=1684599828; 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=v0AU0gQr/TlKSWzyc9TH4fnGLPzk/caMMfN0PqmRSGY=; b=C1Iu+QDLrHE1mR740lLtFhGzg51pSdpvsBreErfRxLBTgw+MRscZjj6dhLp1tTJNms d0xklrU4hQj9yB4bd93unJ4ZDhcdSD3EHtdD1CR53/FPZbTX6B3ue959Rg59eoWq82Go xROa3sXMFnP5NpwOBeySm48lTYtFQOjGLVMSJ5Zr4nnMvImmHh7KOUx6O+wTrEcfd/j3 +Foe0FXQ9iN0SwaCIx2VG0bAyI7BnIN1/j+mMqnklCL4BrzP8FYb2f1YXmvwQ6JIlSHJ azhiYXteq/5UdIoepWqQ8PbLzr/R2YdZTosMvKmUX+kqMKClzo2++ZNv2xBp/5SWPZ2B pnBw== X-Gm-Message-State: AAQBX9dnTwzyTPoCmy+tNYO/5bx8hvZ9Jp3AuMU5dkAR1nIJvvo/XyKB ia90Knz+eXqPoa86bqtCtC/3agqMo5c02A== X-Google-Smtp-Source: AKy350bDoWRqfPwk6ZRbf9SHZJTolj/v0w4SDHrHqa+QCdOujYKe1DVhU23gc9fc+A4Sy1weQzP7Cw== X-Received: by 2002:a17:907:a80d:b0:953:91aa:db47 with SMTP id vo13-20020a170907a80d00b0095391aadb47mr2782202ejc.0.1682007827884; Thu, 20 Apr 2023 09:23:47 -0700 (PDT) Received: from xeon.. ([188.163.112.59]) by smtp.gmail.com with ESMTPSA id gq18-20020a170906e25200b0094eeda0df09sm894154ejb.179.2023.04.20.09.23.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 20 Apr 2023 09:23:47 -0700 (PDT) From: Svyatoslav Ryhel To: Marek Vasut , Stefan Roese , Simon Glass , Svyatoslav Ryhel Cc: u-boot@lists.denx.de Subject: [PATCH v2 0/1] Add MAX14526 MUIC driver Date: Thu, 20 Apr 2023 19:23:36 +0300 Message-Id: <20230420162337.24666-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. Unfortunately U-Boot has no extcon driver model so I used a MISC model for now. 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. --- Changes from v1: - used log_* instead of printf - log messages made simpler --- Svyatoslav Ryhel (1): misc: extcon: add MAX14526 MUIC support drivers/misc/Kconfig | 2 + drivers/misc/Makefile | 1 + drivers/misc/extcon/Kconfig | 8 ++ drivers/misc/extcon/Makefile | 2 + drivers/misc/extcon/extcon-max14526.c | 151 ++++++++++++++++++++++++++ 5 files changed, 164 insertions(+) create mode 100644 drivers/misc/extcon/Kconfig create mode 100644 drivers/misc/extcon/Makefile create mode 100644 drivers/misc/extcon/extcon-max14526.c -- 2.37.2