Received: by 2002:ab2:23c8:0:b0:1f2:fdbc:cb93 with SMTP id a8csp140400lqe; Wed, 27 Mar 2024 01:00:25 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWDB6zVkkbGXpq61dC9+wXCZ2TY3g0QOuriRIxr+2s/vMgSrvVSj1oBkw+dGhpBIOYQpNT8OHcY1T8TeQMHXiMZ0QWzb4pZd/ft5NgFzw== X-Google-Smtp-Source: AGHT+IFdCigCjZSXpB/HV1WQkYMZxM2426Fwt2qydepHeZFFznqSbEavSMFs7p4OC48opG464Sqm X-Received: by 2002:a17:902:e849:b0:1e0:f504:a6f9 with SMTP id t9-20020a170902e84900b001e0f504a6f9mr2106037plg.27.1711526424805; Wed, 27 Mar 2024 01:00:24 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711526424; cv=pass; d=google.com; s=arc-20160816; b=o5D0kxTrgyhKt3Y+Pgebw97m/JK4h2MjZYzMxEdMA9xmlqHGifkTo8VedU6mgaQjWk pn62/rvjVpEvpAcA/94msaCJV3s/3n6nnej4nGlSeA2BSki9Na4w5TwjvfIQL7gTXoVO OOWZUCOz5x0+3MLw0c9xKNUBIdon4k5q7FBMCtC2LNeCZIN/KmQntf9w2cYG9gN5eREb UvClxozK5g91eAIfoO82WQjn417pKBL56jqJm6euaHbjlBtEYtBXkUhlOcYlgdCm6EOh etnYqmRmgeYvSnugmF+weG4/OqWZqm1Qi2bJN1/M0kXLHZy2TysaM6uZOTMLr03ogs+L nAGA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:dkim-signature; bh=FvCZIXlyJ0i9W5y1NVajdFVbSmQI+ddDaK6Um2GHqYw=; fh=ncikpEUMapcsAlJFa3dxBiSCT3tCOLSdIFNvIWpTI7A=; b=I4yon9v2q6bD7WWTn55LlQtF92H6yVXz3jwdw9y/9obOufbBNczNxL1gIpHkRljgMH RgCBMMteFkHte8VjQm27U8s37EGw2A4Av49eeYw+6GAFm+cRt4P3RFmUvM0opqRYwGD4 Y79aqWlp9amrUtUya5M+cL04QwXhbbl92vxZuftIi/Nt0+iXQYIWVW8y8TO50M8l4iSf V4Bs/KBGEyRATxhvwSyPM/fqWaBxnPw3avc2idC3/5qovBjgBJarv9vInZebF905TIXI lA7MbAFNutnvDlJJnBg6lOR5MEVMCXoLoC/DY1V0s0TJeoEzs00ECp2gptwMTsg0E9IB ZiKQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=QGeKM79S; arc=pass (i=1 spf=pass spfdomain=redhat.com dkim=pass dkdomain=redhat.com dmarc=pass fromdomain=redhat.com); spf=pass (google.com: domain of linux-kernel+bounces-120487-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-120487-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id k3-20020a170902d58300b001e02dff570esi8956705plh.202.2024.03.27.01.00.24 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Mar 2024 01:00:24 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-120487-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=QGeKM79S; arc=pass (i=1 spf=pass spfdomain=redhat.com dkim=pass dkdomain=redhat.com dmarc=pass fromdomain=redhat.com); spf=pass (google.com: domain of linux-kernel+bounces-120487-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-120487-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 6F5E82A343B for ; Wed, 27 Mar 2024 08:00:24 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6ED4A4AECD; Wed, 27 Mar 2024 07:58:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="QGeKM79S" Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E5C1F45954 for ; Wed, 27 Mar 2024 07:58:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711526283; cv=none; b=ricKyfQQC3gbVeBNSj1P5oAag4m4O6f1qW11jC93mTjZRIh51AYlyyhDab7gUO3+LKpxLTHCw+sc0n/M0c1C6gcev3HTUUM9bebEwziw/Dl4YTeB4IydXV0mb0BMXxvDCW1Jc43JcrNxpLKsl54JhxmJMTcgUiOJspHaYfnU8kY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711526283; c=relaxed/simple; bh=+jMhjERTTtRLM0KWZ1Ds1bG7HJxMTKBPNk0QcjknlfM=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=sLHygBdvfMVNmPy27TdG5N0zewedTi1uRsVSZpuO9+Q7Uyclw/GLmEtREj6aZedXQ2rftDYecCkvUGDogqfkbkNuxq00cC7Pm8krcYYgpKP9YnoWnmgXYcyrXz0HtJR99SlqmbMcjiDdoLysl8DpDgzy1rRZHcqo69XbrlG8DxQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=QGeKM79S; arc=none smtp.client-ip=170.10.129.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1711526281; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=FvCZIXlyJ0i9W5y1NVajdFVbSmQI+ddDaK6Um2GHqYw=; b=QGeKM79SYM2frmbmt2fxZHlTNPc5Oc842ZXIV9fYAHyaizqKZdm6AQwbQ2/i7sBfZ6yLBG /3zjToBOF6R5v9/jolUeie+s7O0lGrLHanmRp8WfGz9AHCuTQt4iVPqe1SUqo5L+iRAxdS JXhpwPhJDXSNffPjD54Q6jbnEfn3mdQ= Received: from mail-pg1-f197.google.com (mail-pg1-f197.google.com [209.85.215.197]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-613-R9b45yNHNeijrkQ2kURyKw-1; Wed, 27 Mar 2024 03:57:59 -0400 X-MC-Unique: R9b45yNHNeijrkQ2kURyKw-1 Received: by mail-pg1-f197.google.com with SMTP id 41be03b00d2f7-5ca4ee5b97aso3076420a12.1 for ; Wed, 27 Mar 2024 00:57:59 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711526279; x=1712131079; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=FvCZIXlyJ0i9W5y1NVajdFVbSmQI+ddDaK6Um2GHqYw=; b=Uv9XhyvHlfyzm2jyXkAD5W3NZzw4ZVIhH77RcFc+BEDrcaUBcPoart3JXIgc1y5bH5 YZzaBmSbfLa46bx/9FZz+wb/mwJwmo3coNtIdZzSBsbJ21BrPSL6hIg0JazxOPt347SF NnjCL2izvWFwLWRXcfW0uz4NT3Pbce1XI/4DJyRZ54fJ05o9jiqGqyVeVKsEjFeszjsn ZmK0fEIU0ak/RF8CI/1SQzzM6otjz30XDwALS5dkLSd9csKBls59umoAfa6DqC6M+vhN 7yGCOJAuRFPJUjAL/RU7WgP3EfQ8A/r56rHNTz/CYOcSM922dUi0jLIxWVqFmaJCaTnl dpJA== X-Forwarded-Encrypted: i=1; AJvYcCVVusx8GIVAL0AznOV3yVz/Lt0TSRrQbZY7vX+5U21RKu4q+V34mV2SLbmmLtqW6k951Gb8Mx4i0HAVC5vYX6wFEveKXat7xa9lV7gN X-Gm-Message-State: AOJu0Yz+uqvW3eC/2T/PpMR/PlwsKw+7RZcnu6UMqLY7CSwLxzC9i16k KU45GOjPtsKhdUD8MR4loSx0/A7CcRTAmr95+HcMQvDExj5GcPYF0JV95/1+MG8QE+VXLJP3qtk 3LGPxZO7ZkaWurkBbO7LlksBnkbkswt9Ero7jHKba022nhUvFfN4e+Omu5HXkLK47fDr++QGzaO mbL0vV3u+dPwjYF2KaNaHuUrRAb9d2iCgaJUTm X-Received: by 2002:a05:6a21:78a1:b0:1a3:5440:520 with SMTP id bf33-20020a056a2178a100b001a354400520mr2261630pzc.1.1711526278845; Wed, 27 Mar 2024 00:57:58 -0700 (PDT) X-Received: by 2002:a05:6a21:78a1:b0:1a3:5440:520 with SMTP id bf33-20020a056a2178a100b001a354400520mr2261613pzc.1.1711526278530; Wed, 27 Mar 2024 00:57:58 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240324150107.976025-1-hpa@redhat.com> <20240324150107.976025-2-hpa@redhat.com> In-Reply-To: From: Kate Hsuan Date: Wed, 27 Mar 2024 15:57:47 +0800 Message-ID: Subject: Re: [PATCH v5 RESEND 1/6] platform: x86-android-tablets: other: Add swnode for Xiaomi pad2 indicator LED To: Andy Shevchenko Cc: Pavel Machek , Lee Jones , linux-leds@vger.kernel.org, platform-driver-x86@vger.kernel.org, Hans de Goede , =?UTF-8?Q?Ilpo_J=C3=A4rvinen?= , =?UTF-8?Q?Andr=C3=A9_Apitzsch?= , linux-kernel@vger.kernel.org, Sebastian Reichel , linux-pm@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi Andy, Thank you for reviewing it. On Mon, Mar 25, 2024 at 3:30=E2=80=AFAM Andy Shevchenko wrote: > > On Sun, Mar 24, 2024 at 5:02=E2=80=AFPM Kate Hsuan wrote= : > > > > There is a KTD2026 LED controller to manage the indicator LED for Xiaom= i > > pad2. The ACPI for it is not properly made so the kernel can't get > > a correct description of it. > > > > This work add a description for this RGB LED controller and also set a > > adds > sets > > > trigger to indicate the chaging event (bq27520-0-charging). When it is > > charging > > > charging, the indicator LED will be turn on. > > turned > > ... > > > +/* main fwnode for ktd2026 */ > > +static const struct software_node ktd2026_node =3D { > > + .name =3D "ktd2026" > > Leave a comma, this is not a terminator. > > > +}; > > When I asked about the name I relied on the fact that you have an idea > how it works. So, assuming my understanding is correct, this platform > may not have more than a single LED of this type. Dunno if we need a > comment about this. I'll make a comment to describe the configuration. This LED controller can be configured to an RGB LED like this. Also, it can be configured as three single-color (RGB) LEDs to show red, green, and blue only. I think the name can be "ktd2026-multi-color". Is it good for you? > > ... > > > +static int __init xiaomi_mipad2_init(void) > > +{ > > + return software_node_register_node_group(ktd2026_node_group); > > +} > > + > > +static void xiaomi_mipad2_exit(void) > > __exit ? No need. x86-andriod-tablet is based on platform_driver and platform_device so it doesn't need __exit. I put __exit and the compiler complained about the warning. =3D=3D=3D WARNING: modpost: drivers/platform/x86/x86-android-tablets/x86-android-tablets: section mismatch in reference: xiaomi_mipad2_info+0x50 (section: .init.rodata) -> xiaomi_mipad2_exit (section: .exit.text) =3D=3D=3D > > > +{ > > + software_node_unregister_node_group(ktd2026_node_group); > > +} > > -- > With Best Regards, > Andy Shevchenko > I'll propose the v6 patch to fix them according to your comments. -- BR, Kate