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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id F2A81CCA489 for ; Tue, 26 Jul 2022 11:46:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233005AbiGZLqj (ORCPT ); Tue, 26 Jul 2022 07:46:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55634 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232740AbiGZLqi (ORCPT ); Tue, 26 Jul 2022 07:46:38 -0400 Received: from mail-qt1-x82c.google.com (mail-qt1-x82c.google.com [IPv6:2607:f8b0:4864:20::82c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F413C24BDC; Tue, 26 Jul 2022 04:46:36 -0700 (PDT) Received: by mail-qt1-x82c.google.com with SMTP id u12so10232318qtk.0; Tue, 26 Jul 2022 04:46:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=wL1b72wWwttocLxQ4i2N7IFKv69W21HPhWs4hRLf0o0=; b=AZ8qDLn4Znu85xCahXNOnmojv9wcePPk3Lf2KSJODsdYIL/u4rdAI0Lnw8MiXeeTQl 0fNcl+cJw4vrGMs/9mjAcX99bHsbOpeBwt1ay2R33YRq1VsVjC++YG2fmlp7hix1YwsO IKZ3zoTB97u6iKZxmk+c33+dSbGXuJXJDQz+RRlu+LRdNCgrsyBWNRh2nYIBbuWUos51 BrJUcA7G/8NE1M8r1t7zyLNEvXtcGsNdIwqfkXwOFPRNUwWDTrUivYLlX/lxHIIPKvWG uXmZtHYk57ezocXOjrXXXwhnGpuE94ql5T95iceJZSiu4iSTtJVip83p/q4s/P1JT7m/ PgVQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=wL1b72wWwttocLxQ4i2N7IFKv69W21HPhWs4hRLf0o0=; b=wvpnYcrqPqDabB8SW5KSFMUYX0aK44p9eQIe9nlxcfis3Mdmi5cDaHQVkXupczyKOc GUXeWGFIfKOtsPn9HMGR1vVzNcd9Suh6fMHxm/2EpODI081YjQiCr07vZ7rdvwqoVXdU l+UhkoLymdbCOTE92gQAoUnKY/3Ln6dxdUQJz6DdDZP5m3GZOw3v0AGO8xx2pU3uQgNS El/qLbHDgfQSvvnVtETCjHvad0rx/1z2YdYdtcGMRyiShArQSuojf8xKIabwCgw/vYAu 0wSJR2ApvrkKBhrnrxD66zFVuRj2v8HJ0yrhBvON8eutSbfvNcN8Vj2m+Td1uIrxj28K jQBQ== X-Gm-Message-State: AJIora+A+mosHoqzSrnva77+s7B6I/5oJ7n4l9HJJlWqtX8if5/BxLJY m4MK65D3+ln3/uSARZx+S+8g1u8tH5TnJ8erMvE= X-Google-Smtp-Source: AGRyM1sOWaWg8F0hJmRbLUJyv570Fqyt5WL0lP9RdfcVPQQLkd4tLFbTSnSOHuBdwqMxVIGbB1G4Kxurui/itRlhhGY= X-Received: by 2002:ac8:5a8b:0:b0:31f:27b8:2260 with SMTP id c11-20020ac85a8b000000b0031f27b82260mr13732022qtc.198.1658835995667; Tue, 26 Jul 2022 04:46:35 -0700 (PDT) MIME-Version: 1.0 References: <20220722102407.2205-1-peterwu.pub@gmail.com> <20220722102407.2205-12-peterwu.pub@gmail.com> In-Reply-To: From: ChiaEn Wu Date: Tue, 26 Jul 2022 19:45:59 +0800 Message-ID: Subject: Re: [PATCH v6 11/13] leds: rgb: mt6370: Add MediaTek MT6370 current sink type LED Indicator support To: Andy Shevchenko Cc: Lee Jones , Daniel Thompson , Jingoo Han , Pavel Machek , Rob Herring , Krzysztof Kozlowski , Matthias Brugger , Sebastian Reichel , Chunfeng Yun , Greg Kroah-Hartman , Jonathan Cameron , Lars-Peter Clausen , Liam Girdwood , Mark Brown , Guenter Roeck , "Krogerus, Heikki" , Helge Deller , ChiaEn Wu , Alice Chen , cy_huang , dri-devel , Linux LED Subsystem , devicetree , linux-arm Mailing List , "moderated list:ARM/Mediatek SoC support" , Linux Kernel Mailing List , Linux PM , USB , linux-iio , "open list:FRAMEBUFFER LAYER" , szuni chen Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-leds@vger.kernel.org On Mon, Jul 25, 2022 at 4:41 PM Andy Shevchenko wrote: ... > > From: ChiYuan Huang > > ^^^^ (Note this and read below) ... > In conjunction with above what SoB of Alice means? > > You really need to take your time and (re-)read > https://www.kernel.org/doc/html/latest/process/submitting-patches.html. Hi Andy, Thanks for your reply. We are very sorry for this mistake. We will revise it in the next patch. > > ... > > > + * Author: Alice Chen > > + * Author: ChiYuan Huang > > Would > * Authors: > * Name_of_Author 1 > * Name_of_Author 2 > > work for you? It looks good, thanks! We will apply this in the next patch. ... > > +struct mt6370_led { > > + union { > > + struct led_classdev isink; > > + struct led_classdev_mc mc; > > + }; > > Where is the field that makes union work? Just for saving memory space. Because these led_classdevs do not be used at the same time. Or do you think it would be better to rewrite it as follows? ------------------------------------------------------------------------------------- struct mt6370_led { struct led_classdev isink; struct led_classdev_mc mc; struct mt6370_priv *priv; u32 default_state; u32 index; }; ------------------------------------------------------------------------------------- ... > > +static int mt6370_gen_breath_pattern(struct mt6370_priv *priv, > > + struct led_pattern *pattern, u32 len, > > + u8 *pattern_val, u32 val_len) > > +{ > > + enum mt6370_led_ranges sel_range; > > + struct led_pattern *curr; > > + unsigned int sel; > > + u8 val[P_MAX_PATTERNS / 2] = {}; > > + int i; > > + > > + if (len < P_MAX_PATTERNS && val_len < P_MAX_PATTERNS / 2) > > + return -EINVAL; > > + > > + /* > > + * Pattern list > > + * tr1: byte 0, b'[7: 4] > > + * tr2: byte 0, b'[3: 0] > > + * tf1: byte 1, b'[7: 4] > > + * tf2: byte 1, b'[3: 0] > > + * ton: byte 2, b'[7: 4] > > + * toff: byte 2, b'[3: 0] > > + */ > > + for (i = 0; i < P_MAX_PATTERNS; i++) { > > + curr = pattern + i; > > + > > + sel_range = i == P_LED_TOFF ? R_LED_TOFF : R_LED_TRFON; > > + > > + linear_range_get_selector_within(priv->ranges + sel_range, > > + curr->delta_t, &sel); > > + > > + val[i / 2] |= sel << (4 * ((i + 1) % 2)); > > + } > > + > > + memcpy(pattern_val, val, 3); > > Isn't it something like put_unaligned_be24()/put_unaligned_le24()? OK, we will try to apply this method in the next patch. Thank you so much for reviewing our patches so many times and providing so many great suggestions! -- Best Regards, ChiaEn Wu 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 gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id B449BCCA490 for ; Tue, 26 Jul 2022 11:46:42 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 5284E11BFB3; Tue, 26 Jul 2022 11:46:39 +0000 (UTC) Received: from mail-qt1-x834.google.com (mail-qt1-x834.google.com [IPv6:2607:f8b0:4864:20::834]) by gabe.freedesktop.org (Postfix) with ESMTPS id A4E5114A443 for ; Tue, 26 Jul 2022 11:46:36 +0000 (UTC) Received: by mail-qt1-x834.google.com with SMTP id h22so10223343qta.3 for ; Tue, 26 Jul 2022 04:46:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=wL1b72wWwttocLxQ4i2N7IFKv69W21HPhWs4hRLf0o0=; b=AZ8qDLn4Znu85xCahXNOnmojv9wcePPk3Lf2KSJODsdYIL/u4rdAI0Lnw8MiXeeTQl 0fNcl+cJw4vrGMs/9mjAcX99bHsbOpeBwt1ay2R33YRq1VsVjC++YG2fmlp7hix1YwsO IKZ3zoTB97u6iKZxmk+c33+dSbGXuJXJDQz+RRlu+LRdNCgrsyBWNRh2nYIBbuWUos51 BrJUcA7G/8NE1M8r1t7zyLNEvXtcGsNdIwqfkXwOFPRNUwWDTrUivYLlX/lxHIIPKvWG uXmZtHYk57ezocXOjrXXXwhnGpuE94ql5T95iceJZSiu4iSTtJVip83p/q4s/P1JT7m/ PgVQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=wL1b72wWwttocLxQ4i2N7IFKv69W21HPhWs4hRLf0o0=; b=CVZZUBGAYYQj7Cj3s/35rEqes48CVcAXoUBQ1c2oKTKH61UDtLs6ahrHbovrAx6I5k +p83iUmsgaSuEjkPihb7M4upZuEhb7sVHjIGq4RhZbNNCbGYQwykRjOVxXjUaMxMNcnO bBhBwxy5wK0NBOJKJglXYgLSy5NNxfbP2tk7W0MJ6JrTgHJ4e9CTSpQdiDiYx3Wh7WPT J7qCAiNF2G6yGHrhB0SXi/CXNqDqv/6I85Caj4x12s8Mjdu9znfQY4J9TtRWoRMgsbY0 ycL2zHohiOvjJvRvMKXqz1FuYmLnJWsixay6CiA50b9wN/IR6iuYQYTCLy7Cx6Jl5Zeq wpaQ== X-Gm-Message-State: AJIora8JGl9fgrEtKs+APImCYwgQZ+HZej8lhoD/U9W2Jb8B7awmGP9E IIiTRky/rs5jXLdzSmnbCJXJrOORkz1mjWA4zdsHxzO4jH4= X-Google-Smtp-Source: AGRyM1sOWaWg8F0hJmRbLUJyv570Fqyt5WL0lP9RdfcVPQQLkd4tLFbTSnSOHuBdwqMxVIGbB1G4Kxurui/itRlhhGY= X-Received: by 2002:ac8:5a8b:0:b0:31f:27b8:2260 with SMTP id c11-20020ac85a8b000000b0031f27b82260mr13732022qtc.198.1658835995667; Tue, 26 Jul 2022 04:46:35 -0700 (PDT) MIME-Version: 1.0 References: <20220722102407.2205-1-peterwu.pub@gmail.com> <20220722102407.2205-12-peterwu.pub@gmail.com> In-Reply-To: From: ChiaEn Wu Date: Tue, 26 Jul 2022 19:45:59 +0800 Message-ID: Subject: Re: [PATCH v6 11/13] leds: rgb: mt6370: Add MediaTek MT6370 current sink type LED Indicator support To: Andy Shevchenko Content-Type: text/plain; charset="UTF-8" X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "open list:FRAMEBUFFER LAYER" , "Krogerus, Heikki" , Krzysztof Kozlowski , Alice Chen , linux-iio , dri-devel , Liam Girdwood , cy_huang , Pavel Machek , Lee Jones , Linux LED Subsystem , Daniel Thompson , Helge Deller , Rob Herring , Chunfeng Yun , Guenter Roeck , devicetree , Linux PM , szuni chen , Mark Brown , "moderated list:ARM/Mediatek SoC support" , Matthias Brugger , linux-arm Mailing List , Jingoo Han , USB , Sebastian Reichel , Linux Kernel Mailing List , ChiaEn Wu , Greg Kroah-Hartman , Jonathan Cameron Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" On Mon, Jul 25, 2022 at 4:41 PM Andy Shevchenko wrote: ... > > From: ChiYuan Huang > > ^^^^ (Note this and read below) ... > In conjunction with above what SoB of Alice means? > > You really need to take your time and (re-)read > https://www.kernel.org/doc/html/latest/process/submitting-patches.html. Hi Andy, Thanks for your reply. We are very sorry for this mistake. We will revise it in the next patch. > > ... > > > + * Author: Alice Chen > > + * Author: ChiYuan Huang > > Would > * Authors: > * Name_of_Author 1 > * Name_of_Author 2 > > work for you? It looks good, thanks! We will apply this in the next patch. ... > > +struct mt6370_led { > > + union { > > + struct led_classdev isink; > > + struct led_classdev_mc mc; > > + }; > > Where is the field that makes union work? Just for saving memory space. Because these led_classdevs do not be used at the same time. Or do you think it would be better to rewrite it as follows? ------------------------------------------------------------------------------------- struct mt6370_led { struct led_classdev isink; struct led_classdev_mc mc; struct mt6370_priv *priv; u32 default_state; u32 index; }; ------------------------------------------------------------------------------------- ... > > +static int mt6370_gen_breath_pattern(struct mt6370_priv *priv, > > + struct led_pattern *pattern, u32 len, > > + u8 *pattern_val, u32 val_len) > > +{ > > + enum mt6370_led_ranges sel_range; > > + struct led_pattern *curr; > > + unsigned int sel; > > + u8 val[P_MAX_PATTERNS / 2] = {}; > > + int i; > > + > > + if (len < P_MAX_PATTERNS && val_len < P_MAX_PATTERNS / 2) > > + return -EINVAL; > > + > > + /* > > + * Pattern list > > + * tr1: byte 0, b'[7: 4] > > + * tr2: byte 0, b'[3: 0] > > + * tf1: byte 1, b'[7: 4] > > + * tf2: byte 1, b'[3: 0] > > + * ton: byte 2, b'[7: 4] > > + * toff: byte 2, b'[3: 0] > > + */ > > + for (i = 0; i < P_MAX_PATTERNS; i++) { > > + curr = pattern + i; > > + > > + sel_range = i == P_LED_TOFF ? R_LED_TOFF : R_LED_TRFON; > > + > > + linear_range_get_selector_within(priv->ranges + sel_range, > > + curr->delta_t, &sel); > > + > > + val[i / 2] |= sel << (4 * ((i + 1) % 2)); > > + } > > + > > + memcpy(pattern_val, val, 3); > > Isn't it something like put_unaligned_be24()/put_unaligned_le24()? OK, we will try to apply this method in the next patch. Thank you so much for reviewing our patches so many times and providing so many great suggestions! -- Best Regards, ChiaEn Wu 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 83882C433EF for ; Tue, 26 Jul 2022 11:47:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:Subject:Message-ID:Date:From: In-Reply-To:References:MIME-Version:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=dmQOEuRV+2DGBcEpr9StpLwP2tKLYPC/MbOQn/SEMjY=; b=BQNbOB7qvaC5s/ naWZozz3wY13h3g27TS5G1hHZrluKNVbXAyaqvVNkGz9odf8AcpoL7pfzEXSMPh15w1qm+NFRWIvT b8Ff6M32F3qsogNTk4fxQTPr5NNeBAi3rZCPLuedQ4jlNr8MvXGrwmiEUkajV4iCiite0QlRgGYzO NEyT8HAvetbXgw6pG6ve11UJpa8gUGLWG7ucCc6kFNvkTefq0FcmkZFwAGTbx0aieZ72xtF4bdXHG CjOfMm/eeLtrU0RIWDCwZdSF8kv7ajtyJgjnKCWKtrzYIsBau6Tgru2vO8w4aLEtaOUyqZsbWfuOO TLdIveBaa1buimT3ZgAQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oGJ1N-00GJQ8-QM; Tue, 26 Jul 2022 11:46:41 +0000 Received: from mail-qt1-x835.google.com ([2607:f8b0:4864:20::835]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oGJ1K-00GJAH-NU; Tue, 26 Jul 2022 11:46:40 +0000 Received: by mail-qt1-x835.google.com with SMTP id w29so10190999qtv.9; Tue, 26 Jul 2022 04:46:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=wL1b72wWwttocLxQ4i2N7IFKv69W21HPhWs4hRLf0o0=; b=AZ8qDLn4Znu85xCahXNOnmojv9wcePPk3Lf2KSJODsdYIL/u4rdAI0Lnw8MiXeeTQl 0fNcl+cJw4vrGMs/9mjAcX99bHsbOpeBwt1ay2R33YRq1VsVjC++YG2fmlp7hix1YwsO IKZ3zoTB97u6iKZxmk+c33+dSbGXuJXJDQz+RRlu+LRdNCgrsyBWNRh2nYIBbuWUos51 BrJUcA7G/8NE1M8r1t7zyLNEvXtcGsNdIwqfkXwOFPRNUwWDTrUivYLlX/lxHIIPKvWG uXmZtHYk57ezocXOjrXXXwhnGpuE94ql5T95iceJZSiu4iSTtJVip83p/q4s/P1JT7m/ PgVQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=wL1b72wWwttocLxQ4i2N7IFKv69W21HPhWs4hRLf0o0=; b=LKs8ZWT0PN/KLwSsMQboISsr2lOGzdD0rlEQxkjFl5T37OMTzMwrFBqJXwHigM92ws Y+dYnfK8LJ7QvPRzG+DouYWr+82K2I/il7EX+X880rtnabElwM2udgulvLg2Meyb06Jr 4Nps9CixtOeMlqLtmfOBPccjN7DU99eMTdQluFlrH5Kg8aXjNzjBIX3VvSRX5jfxzHmh xtBvdbafyfYIp114h8Dp6ACgGilCOJXcSTs03Q0y2SEIm2ih1/57aAn0W5UErRe5RBWu OOoT13khNDnTZ2tULKKt0gxI2m3M5+Fc9aHjiFNptAMANdQI4hqnXgURfsD1PjCX3pwd dL0g== X-Gm-Message-State: AJIora+AqUVFLI5kbvz8id1Th0op6Yd2JcePu3BFnLNWY7mIJKp9ul2B yrfdHck7iAJXP2NyPdZk2IzYLFzRaNqkQdNVjkU= X-Google-Smtp-Source: AGRyM1sOWaWg8F0hJmRbLUJyv570Fqyt5WL0lP9RdfcVPQQLkd4tLFbTSnSOHuBdwqMxVIGbB1G4Kxurui/itRlhhGY= X-Received: by 2002:ac8:5a8b:0:b0:31f:27b8:2260 with SMTP id c11-20020ac85a8b000000b0031f27b82260mr13732022qtc.198.1658835995667; Tue, 26 Jul 2022 04:46:35 -0700 (PDT) MIME-Version: 1.0 References: <20220722102407.2205-1-peterwu.pub@gmail.com> <20220722102407.2205-12-peterwu.pub@gmail.com> In-Reply-To: From: ChiaEn Wu Date: Tue, 26 Jul 2022 19:45:59 +0800 Message-ID: Subject: Re: [PATCH v6 11/13] leds: rgb: mt6370: Add MediaTek MT6370 current sink type LED Indicator support To: Andy Shevchenko Cc: Lee Jones , Daniel Thompson , Jingoo Han , Pavel Machek , Rob Herring , Krzysztof Kozlowski , Matthias Brugger , Sebastian Reichel , Chunfeng Yun , Greg Kroah-Hartman , Jonathan Cameron , Lars-Peter Clausen , Liam Girdwood , Mark Brown , Guenter Roeck , "Krogerus, Heikki" , Helge Deller , ChiaEn Wu , Alice Chen , cy_huang , dri-devel , Linux LED Subsystem , devicetree , linux-arm Mailing List , "moderated list:ARM/Mediatek SoC support" , Linux Kernel Mailing List , Linux PM , USB , linux-iio , "open list:FRAMEBUFFER LAYER" , szuni chen X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220726_044638_798558_B09082AE X-CRM114-Status: GOOD ( 26.41 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Mon, Jul 25, 2022 at 4:41 PM Andy Shevchenko wrote: ... > > From: ChiYuan Huang > > ^^^^ (Note this and read below) ... > In conjunction with above what SoB of Alice means? > > You really need to take your time and (re-)read > https://www.kernel.org/doc/html/latest/process/submitting-patches.html. Hi Andy, Thanks for your reply. We are very sorry for this mistake. We will revise it in the next patch. > > ... > > > + * Author: Alice Chen > > + * Author: ChiYuan Huang > > Would > * Authors: > * Name_of_Author 1 > * Name_of_Author 2 > > work for you? It looks good, thanks! We will apply this in the next patch. ... > > +struct mt6370_led { > > + union { > > + struct led_classdev isink; > > + struct led_classdev_mc mc; > > + }; > > Where is the field that makes union work? Just for saving memory space. Because these led_classdevs do not be used at the same time. Or do you think it would be better to rewrite it as follows? ------------------------------------------------------------------------------------- struct mt6370_led { struct led_classdev isink; struct led_classdev_mc mc; struct mt6370_priv *priv; u32 default_state; u32 index; }; ------------------------------------------------------------------------------------- ... > > +static int mt6370_gen_breath_pattern(struct mt6370_priv *priv, > > + struct led_pattern *pattern, u32 len, > > + u8 *pattern_val, u32 val_len) > > +{ > > + enum mt6370_led_ranges sel_range; > > + struct led_pattern *curr; > > + unsigned int sel; > > + u8 val[P_MAX_PATTERNS / 2] = {}; > > + int i; > > + > > + if (len < P_MAX_PATTERNS && val_len < P_MAX_PATTERNS / 2) > > + return -EINVAL; > > + > > + /* > > + * Pattern list > > + * tr1: byte 0, b'[7: 4] > > + * tr2: byte 0, b'[3: 0] > > + * tf1: byte 1, b'[7: 4] > > + * tf2: byte 1, b'[3: 0] > > + * ton: byte 2, b'[7: 4] > > + * toff: byte 2, b'[3: 0] > > + */ > > + for (i = 0; i < P_MAX_PATTERNS; i++) { > > + curr = pattern + i; > > + > > + sel_range = i == P_LED_TOFF ? R_LED_TOFF : R_LED_TRFON; > > + > > + linear_range_get_selector_within(priv->ranges + sel_range, > > + curr->delta_t, &sel); > > + > > + val[i / 2] |= sel << (4 * ((i + 1) % 2)); > > + } > > + > > + memcpy(pattern_val, val, 3); > > Isn't it something like put_unaligned_be24()/put_unaligned_le24()? OK, we will try to apply this method in the next patch. Thank you so much for reviewing our patches so many times and providing so many great suggestions! -- Best Regards, ChiaEn Wu _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel