URI:
       lore_kernel_org_lkml.atom.xml - sfeed_tests - sfeed tests and RSS and Atom files
  HTML git clone git://git.codemadness.org/sfeed_tests
   DIR Log
   DIR Files
   DIR Refs
   DIR README
   DIR LICENSE
       ---
       lore_kernel_org_lkml.atom.xml (98859B)
       ---
            1 <?xml version="1.0" encoding="us-ascii"?>
            2 <feed
            3 xmlns="http://www.w3.org/2005/Atom"
            4 xmlns:thr="http://purl.org/syndication/thread/1.0"><title>linux-kernel.vger.kernel.org archive mirror</title><link
            5 rel="alternate"
            6 type="text/html"
            7 href="http://lore.kernel.org/lkml/"/><link
            8 rel="self"
            9 href="http://lore.kernel.org/lkml/new.atom"/><id>mailto:linux-kernel@vger.kernel.org</id><updated>2024-11-01T15:48:54Z</updated><entry><author><name>George Stark</name><email>gnstark@salutedevices.com</email></author><title>[PATCH v2 2/2] leds: pwm: Add optional DT property default-brightness</title><updated>2024-11-01T15:48:54Z</updated><link
           10 href="http://lore.kernel.org/lkml/20241101154844.1175860-3-gnstark@salutedevices.com/"/><id>urn:uuid:27f6ef67-80c6-373c-fedb-1f3bd59fea2e</id><thr:in-reply-to
           11 ref="urn:uuid:8c64a34f-09cd-4fba-a1f1-e0655404bfeb"
           12 href="http://lore.kernel.org/lkml/20241101154844.1175860-1-gnstark@salutedevices.com/"/><content
           13 type="xhtml"><div
           14 xmlns="http://www.w3.org/1999/xhtml"><pre
           15 style="white-space:pre-wrap">When probing if default LED state is on then default brightness will be
           16 applied instead of max brightness.
           17 
           18 Signed-off-by: George Stark &lt;gnstark@salutedevices.com&gt;
           19 ---
           20  drivers/leds/leds-pwm.c | 17 ++++++++++++++++-
           21  1 file <a href="http://lore.kernel.org/lkml/20241101154844.1175860-3-gnstark@salutedevices.com/#related">changed</a>, 16 insertions(+), 1 deletion(-)
           22 
           23 <span
           24 class="head">diff --git a/drivers/leds/leds-pwm.c b/drivers/leds/leds-pwm.c
           25 index 7961dca0db2f..7636ee178c39 100644
           26 --- a/drivers/leds/leds-pwm.c
           27 +++ b/drivers/leds/leds-pwm.c
           28 </span><span
           29 class="hunk">@@ -63,6 +63,20 @@ static int led_pwm_set(struct led_classdev *led_cdev,
           30 </span>         return pwm_apply_might_sleep(led_dat-&gt;pwm, &#38;led_dat-&gt;pwmstate);
           31  }
           32  
           33 <span
           34 class="add">+static int led_pwm_default_brightness_get(struct fwnode_handle *fwnode,
           35 +                                          int max_brightness)
           36 +{
           37 +        unsigned int default_brightness;
           38 +        int ret;
           39 +
           40 +        ret = fwnode_property_read_u32(fwnode, &#34;default-brightness&#34;,
           41 +                                       &#38;default_brightness);
           42 +        if (ret &lt; 0 || default_brightness &gt; max_brightness)
           43 +                default_brightness = max_brightness;
           44 +
           45 +        return default_brightness;
           46 +}
           47 +
           48 </span> __attribute__((nonnull))
           49  static int led_pwm_add(struct device *dev, struct led_pwm_priv *priv,
           50                         struct led_pwm *led, struct fwnode_handle *fwnode)
           51 <span
           52 class="hunk">@@ -104,7 +118,8 @@ static int led_pwm_add(struct device *dev, struct led_pwm_priv *priv,
           53 </span>         /* set brightness */
           54          switch (led-&gt;default_state) {
           55          case LEDS_DEFSTATE_ON:
           56 <span
           57 class="del">-                led_data-&gt;cdev.brightness = led-&gt;max_brightness;
           58 </span><span
           59 class="add">+                led_data-&gt;cdev.brightness =
           60 +                        led_pwm_default_brightness_get(fwnode, led-&gt;max_brightness);
           61 </span>                 break;
           62          case LEDS_DEFSTATE_KEEP:
           63                  {
           64 -- 
           65 2.25.1
           66 
           67 </pre></div></content></entry><entry><author><name>George Stark</name><email>gnstark@salutedevices.com</email></author><title>[PATCH v2 1/2] dt-bindings: leds: pwm: Add default-brightness property</title><updated>2024-11-01T15:48:54Z</updated><link
           68 href="http://lore.kernel.org/lkml/20241101154844.1175860-2-gnstark@salutedevices.com/"/><id>urn:uuid:b4d60b44-7fb5-c644-c4d7-786bf6b2d4b9</id><thr:in-reply-to
           69 ref="urn:uuid:8c64a34f-09cd-4fba-a1f1-e0655404bfeb"
           70 href="http://lore.kernel.org/lkml/20241101154844.1175860-1-gnstark@salutedevices.com/"/><content
           71 type="xhtml"><div
           72 xmlns="http://www.w3.org/1999/xhtml"><pre
           73 style="white-space:pre-wrap">Optional default-brightness property specifies brightness value to be
           74 used if default LED state is on.
           75 
           76 Signed-off-by: George Stark &lt;gnstark@salutedevices.com&gt;
           77 ---
           78  Documentation/devicetree/bindings/leds/leds-pwm.yaml | 6 ++++++
           79  1 file <a href="http://lore.kernel.org/lkml/20241101154844.1175860-2-gnstark@salutedevices.com/#related">changed</a>, 6 insertions(+)
           80 
           81 <span
           82 class="head">diff --git a/Documentation/devicetree/bindings/leds/leds-pwm.yaml b/Documentation/devicetree/bindings/leds/leds-pwm.yaml
           83 index 113b7c218303..61b97e8bc36d 100644
           84 --- a/Documentation/devicetree/bindings/leds/leds-pwm.yaml
           85 +++ b/Documentation/devicetree/bindings/leds/leds-pwm.yaml
           86 </span><span
           87 class="hunk">@@ -34,6 +34,12 @@ patternProperties:
           88 </span>           Maximum brightness possible for the LED
           89          $ref: /schemas/types.yaml#/definitions/uint32
           90  
           91 <span
           92 class="add">+      default-brightness:
           93 +        description:
           94 +          Brightness to be set if LED&#39;s default state is on. Used only during
           95 +          initialization. If the option is not set then max brightness is used.
           96 +        $ref: /schemas/types.yaml#/definitions/uint32
           97 +
           98 </span>     required:
           99        - pwms
          100        - max-brightness
          101 -- 
          102 2.25.1
          103 
          104 </pre></div></content></entry><entry><author><name>George Stark</name><email>gnstark@salutedevices.com</email></author><title>[PATCH v2 0/2] leds: pwm: Add default-brightness property</title><updated>2024-11-01T15:48:53Z</updated><link
          105 href="http://lore.kernel.org/lkml/20241101154844.1175860-1-gnstark@salutedevices.com/"/><id>urn:uuid:8c64a34f-09cd-4fba-a1f1-e0655404bfeb</id><content
          106 type="xhtml"><div
          107 xmlns="http://www.w3.org/1999/xhtml"><pre
          108 style="white-space:pre-wrap">led-pwm driver supports default-state DT property and if that state is on then
          109 the driver during initialization turns on the LED setting maximum brightness.
          110 Sometimes it&#39;s desirable to use lower initial brightness.
          111 This patch series adds support for DT property default-brightness.
          112 
          113 Things to discuss:
          114 If such a property is acceptable it could be moved to leds/common.yaml due to
          115 several drivers support multiple brightness levels and could support the property
          116 too.
          117 
          118 Changes in v2:
          119   leds: pwm: Add optional DT property default-brightness
          120     - refactor patch to make it more accurate
          121   link to v1: [1]
          122 
          123 [1] <a
          124 href="https://lore.kernel.org/lkml/20241015151410.2158102-3-gnstark@salutedevices.com/T/">https://lore.kernel.org/lkml/20241015151410.2158102-3-gnstark@salutedevices.com/T/</a>
          125 
          126 George Stark (2):
          127   dt-bindings: leds: pwm: Add default-brightness property
          128   leds: pwm: Add optional DT property default-brightness
          129 
          130  .../devicetree/bindings/leds/leds-pwm.yaml      |  6 ++++++
          131  drivers/leds/leds-pwm.c                         | 17 ++++++++++++++++-
          132  2 files changed, 22 insertions(+), 1 deletion(-)
          133 
          134 --
          135 2.25.1
          136 
          137 </pre></div></content></entry><entry><author><name>Markus Elfring</name><email>Markus.Elfring@web.de</email></author><title>Re: [PATCH v5 6/7] pinctrl: s32cc: add driver for GPIO functionality</title><updated>2024-11-01T15:46:16Z</updated><link
          138 href="http://lore.kernel.org/lkml/fdf5702a-b739-4643-8288-86e6cfb8403d@web.de/"/><id>urn:uuid:3e278eb7-0877-0270-118e-37defc2a70f4</id><thr:in-reply-to
          139 ref="urn:uuid:e028ca59-5d0a-f486-732a-92c7cb8d2f9c"
          140 href="http://lore.kernel.org/lkml/20241101080614.1070819-7-andrei.stefanescu@oss.nxp.com/"/><content
          141 type="xhtml"><div
          142 xmlns="http://www.w3.org/1999/xhtml"><pre
          143 style="white-space:pre-wrap"><span
          144 class="q">&gt; Add basic GPIO functionality (request, free, get, set) for the existing
          145 &gt; pinctrl SIUL2 driver since the hardware for pinctrl&#38;GPIO is tightly
          146 &gt; coupled.
          147 </span>&#8230;
          148 <span
          149 class="q">&gt; +++ b/drivers/pinctrl/nxp/pinctrl-s32cc.c
          150 </span>&#8230;
          151 <span
          152 class="q">&gt; +static int s32_gpio_request(struct gpio_chip *gc, unsigned int gpio)
          153 &gt; +{
          154 </span>&#8230;
          155 <span
          156 class="q">&gt; +        spin_lock_irqsave(&#38;ipctl-&gt;gpio_configs_lock, flags);
          157 &gt; +        list_add(&#38;gpio_pin-&gt;list, &#38;ipctl-&gt;gpio_configs);
          158 &gt; +        spin_unlock_irqrestore(&#38;ipctl-&gt;gpio_configs_lock, flags);
          159 </span>&#8230;
          160 
          161 Under which circumstances would you become interested to apply a statement
          162 like &#8220;guard(spinlock_irqsave)(&#38;ipctl-&gt;gpio_configs_lock);&#8221;?
          163 <a
          164 href="https://elixir.bootlin.com/linux/v6.12-rc5/source/include/linux/spinlock.h#L551">https://elixir.bootlin.com/linux/v6.12-rc5/source/include/linux/spinlock.h#L551</a>
          165 
          166 Regards,
          167 Markus
          168 </pre></div></content></entry><entry><author><name>kernel test robot</name><email>lkp@intel.com</email></author><title>Re: [PATCH v3 20/22] ACPI: platform_profile: Register class device for platform profile handlers</title><updated>2024-11-01T15:45:51Z</updated><link
          169 href="http://lore.kernel.org/lkml/202411012317.1pQLOspC-lkp@intel.com/"/><id>urn:uuid:ea88037d-f268-1598-cc32-9ead01144b06</id><thr:in-reply-to
          170 ref="urn:uuid:59853637-7e32-04c8-211e-ba7cc208f49f"
          171 href="http://lore.kernel.org/lkml/20241031040952.109057-21-mario.limonciello@amd.com/"/><content
          172 type="xhtml"><div
          173 xmlns="http://www.w3.org/1999/xhtml"><pre
          174 style="white-space:pre-wrap">Hi Mario,
          175 
          176 kernel test robot noticed the following build errors:
          177 
          178 [auto build test ERROR on rafael-pm/linux-next]
          179 [also build test ERROR on rafael-pm/bleeding-edge linus/master v6.12-rc5 next-20241101]
          180 [If your patch is applied to the wrong git tree, kindly drop us a note.
          181 And when submitting patch, we suggest to use &#39;--base&#39; as documented in
          182 <a
          183 href="https://git-scm.com/docs/git-format-patch#_base_tree_information">https://git-scm.com/docs/git-format-patch#_base_tree_information</a>]
          184 
          185 url:    <a
          186 href="https://github.com/intel-lab-lkp/linux/commits/Mario-Limonciello/ACPI-platform-profile-Add-a-name-member-to-handlers/20241031-121650">https://github.com/intel-lab-lkp/linux/commits/Mario-Limonciello/ACPI-platform-profile-Add-a-name-member-to-handlers/20241031-121650</a>
          187 base:   <a
          188 href="https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git">https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git</a> linux-next
          189 patch link:    <a
          190 href="https://lore.kernel.org/r/20241031040952.109057-21-mario.limonciello%40amd.com">https://lore.kernel.org/r/20241031040952.109057-21-mario.limonciello%40amd.com</a>
          191 patch subject: [PATCH v3 20/22] ACPI: platform_profile: Register class device for platform profile handlers
          192 config: x86_64-buildonly-randconfig-005-20241101 (<a
          193 href="https://download.01.org/0day-ci/archive/20241101/202411012317.1pQLOspC-lkp@intel.com/config">https://download.01.org/0day-ci/archive/20241101/202411012317.1pQLOspC-lkp@intel.com/config</a>)
          194 compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
          195 reproduce (this is a W=1 build): (<a
          196 href="https://download.01.org/0day-ci/archive/20241101/202411012317.1pQLOspC-lkp@intel.com/reproduce">https://download.01.org/0day-ci/archive/20241101/202411012317.1pQLOspC-lkp@intel.com/reproduce</a>)
          197 
          198 If you fix the issue in a separate patch/commit (i.e. not just a new version of
          199 the same patch/commit), kindly add following tags
          200 | Reported-by: kernel test robot &lt;lkp@intel.com&gt;
          201 | Closes: <a
          202 href="https://lore.kernel.org/oe-kbuild-all/202411012317.1pQLOspC-lkp@intel.com/">https://lore.kernel.org/oe-kbuild-all/202411012317.1pQLOspC-lkp@intel.com/</a>
          203 
          204 All errors (new ones prefixed by &gt;&gt;):
          205 
          206    drivers/acpi/platform_profile.c: In function &#39;platform_profile_register&#39;:
          207 <span
          208 class="q">&gt;&gt; drivers/acpi/platform_profile.c:303:42: error: implicit declaration of function &#39;MKDEV&#39; [-Werror=implicit-function-declaration]
          209 </span>     303 |                                          MKDEV(0, pprof-&gt;minor), NULL, &#34;platform-profile-%s&#34;,
          210          |                                          ^~~~~
          211    cc1: some warnings being treated as errors
          212 
          213 
          214 vim +/MKDEV +303 drivers/acpi/platform_profile.c
          215 
          216    261        
          217    262        int platform_profile_register(struct platform_profile_handler *pprof)
          218    263        {
          219    264                bool registered;
          220    265                int err;
          221    266        
          222    267                /* Sanity check the profile handler */
          223    268                if (!pprof || bitmap_empty(pprof-&gt;choices, PLATFORM_PROFILE_LAST) ||
          224    269                    !pprof-&gt;profile_set || !pprof-&gt;profile_get) {
          225    270                        pr_err(&#34;platform_profile: handler is invalid\n&#34;);
          226    271                        return -EINVAL;
          227    272                }
          228    273                if (!test_bit(PLATFORM_PROFILE_BALANCED, pprof-&gt;choices)) {
          229    274                        pr_err(&#34;platform_profile: handler does not support balanced profile\n&#34;);
          230    275                        return -EINVAL;
          231    276                }
          232    277                if (!pprof-&gt;dev) {
          233    278                        pr_err(&#34;platform_profile: handler device is not set\n&#34;);
          234    279                        return -EINVAL;
          235    280                }
          236    281        
          237    282                guard(mutex)(&#38;profile_lock);
          238    283                /* We can only have one active profile */
          239    284                if (cur_profile)
          240    285                        return -EEXIST;
          241    286        
          242    287                registered = platform_profile_is_registered();
          243    288                if (!registered) {
          244    289                        /* class for individual handlers */
          245    290                        err = class_register(&#38;platform_profile_class);
          246    291                        if (err)
          247    292                                return err;
          248    293                        /* legacy sysfs files */
          249    294                        err = sysfs_create_group(acpi_kobj, &#38;platform_profile_group);
          250    295                        if (err)
          251    296                                goto cleanup_class;
          252    297        
          253    298                }
          254    299        
          255    300                /* create class interface for individual handler */
          256    301                pprof-&gt;minor = idr_alloc(&#38;platform_profile_minor_idr, pprof, 0, 0, GFP_KERNEL);
          257    302                pprof-&gt;class_dev = device_create(&#38;platform_profile_class, pprof-&gt;dev,
          258  &gt; 303                                                 MKDEV(0, pprof-&gt;minor), NULL, &#34;platform-profile-%s&#34;,
          259    304                                                 pprof-&gt;name);
          260    305                if (IS_ERR(pprof-&gt;class_dev)) {
          261    306                        err = PTR_ERR(pprof-&gt;class_dev);
          262    307                        goto cleanup_legacy;
          263    308                }
          264    309                err = sysfs_create_group(&#38;pprof-&gt;class_dev-&gt;kobj, &#38;platform_profile_group);
          265    310                if (err)
          266    311                        goto cleanup_device;
          267    312        
          268    313                list_add_tail(&#38;pprof-&gt;list, &#38;platform_profile_handler_list);
          269    314                sysfs_notify(acpi_kobj, NULL, &#34;platform_profile&#34;);
          270    315        
          271    316                cur_profile = pprof;
          272    317                return 0;
          273    318        
          274    319        cleanup_device:
          275    320                device_destroy(&#38;platform_profile_class, MKDEV(0, pprof-&gt;minor));
          276    321        
          277    322        cleanup_legacy:
          278    323                if (!registered)
          279    324                        sysfs_remove_group(acpi_kobj, &#38;platform_profile_group);
          280    325        cleanup_class:
          281    326                if (!registered)
          282    327                        class_unregister(&#38;platform_profile_class);
          283    328        
          284    329                return err;
          285    330        }
          286    331        EXPORT_SYMBOL_GPL(platform_profile_register);
          287    332        
          288 
          289 -- 
          290 0-DAY CI Kernel Test Service
          291 <a
          292 href="https://github.com/intel/lkp-tests/wiki">https://github.com/intel/lkp-tests/wiki</a>
          293 </pre></div></content></entry><entry><author><name>Bjorn Andersson</name><email>andersson@kernel.org</email></author><title>Re: [PATCH v4] usb: typec: qcom-pmic: init value of hdr_len/txbuf_len earlier</title><updated>2024-11-01T15:45:15Z</updated><link
          294 href="http://lore.kernel.org/lkml/cmudnqum4qaec6hjoxj7wxfkdui65nkij4q2fziihf7tsmg7ry@qa3lkf4g7npw/"/><id>urn:uuid:adb0ed56-ef08-3b2c-d96a-ca0774a183da</id><thr:in-reply-to
          295 ref="urn:uuid:086dd36b-4979-5bdf-d1ff-ad4b260b842d"
          296 href="http://lore.kernel.org/lkml/20241030133632.2116-1-rex.nie@jaguarmicro.com/"/><content
          297 type="xhtml"><div
          298 xmlns="http://www.w3.org/1999/xhtml"><pre
          299 style="white-space:pre-wrap">On Wed, Oct 30, 2024 at 09:36:32PM GMT, Rex Nie wrote:
          300 <span
          301 class="q">&gt; If the read of USB_PDPHY_RX_ACKNOWLEDGE_REG failed, then hdr_len and
          302 &gt; txbuf_len are uninitialized. This commit stops to print uninitialized
          303 &gt; value and misleading/false data.
          304 &gt; 
          305 &gt; Cc: stable@vger.kernel.org
          306 &gt; Fixes: a4422ff22142 (&#34; usb: typec: qcom: Add Qualcomm PMIC Type-C driver&#34;)
          307 &gt; Signed-off-by: Rex Nie &lt;rex.nie@jaguarmicro.com&gt;
          308 </span>
          309 Reviewed-by: Bjorn Andersson &lt;andersson@kernel.org&gt;
          310 
          311 Nice job. Next time, please don&#39;t use In-Reply-To between patch
          312 versions.
          313 
          314 Regards,
          315 Bjorn
          316 
          317 <span
          318 class="q">&gt; ---
          319 &gt; V2 -&gt; V3:
          320 &gt; - add changelog, add Fixes tag, add Cc stable ml. Thanks heikki
          321 &gt; - Link to v2: <a
          322 href="https://lore.kernel.org/all/20241030022753.2045-1-rex.nie@jaguarmicro.com/">https://lore.kernel.org/all/20241030022753.2045-1-rex.nie@jaguarmicro.com/</a>
          323 &gt; V1 -&gt; V2:
          324 &gt; - keep printout when data didn&#39;t transmit, thanks Bjorn, bod, greg k-h
          325 &gt; - Links: <a
          326 href="https://lore.kernel.org/all/b177e736-e640-47ed-9f1e-ee65971dfc9c@linaro.org/">https://lore.kernel.org/all/b177e736-e640-47ed-9f1e-ee65971dfc9c@linaro.org/</a>
          327 &gt; ---
          328 &gt;  drivers/usb/typec/tcpm/qcom/qcom_pmic_typec_pdphy.c | 8 ++++----
          329 &gt;  1 file changed, 4 insertions(+), 4 deletions(-)
          330 &gt; 
          331 &gt; diff --git a/drivers/usb/typec/tcpm/qcom/qcom_pmic_typec_pdphy.c b/drivers/usb/typec/tcpm/qcom/qcom_pmic_typec_pdphy.c
          332 &gt; index 5b7f52b74a40..726423684bae 100644
          333 &gt; --- a/drivers/usb/typec/tcpm/qcom/qcom_pmic_typec_pdphy.c
          334 &gt; +++ b/drivers/usb/typec/tcpm/qcom/qcom_pmic_typec_pdphy.c
          335 &gt; @@ -227,6 +227,10 @@ qcom_pmic_typec_pdphy_pd_transmit_payload(struct pmic_typec_pdphy *pmic_typec_pd
          336 &gt;  
          337 &gt;          spin_lock_irqsave(&#38;pmic_typec_pdphy-&gt;lock, flags);
          338 &gt;  
          339 &gt; +        hdr_len = sizeof(msg-&gt;header);
          340 &gt; +        txbuf_len = pd_header_cnt_le(msg-&gt;header) * 4;
          341 &gt; +        txsize_len = hdr_len + txbuf_len - 1;
          342 &gt; +
          343 &gt;          ret = regmap_read(pmic_typec_pdphy-&gt;regmap,
          344 &gt;                            pmic_typec_pdphy-&gt;base + USB_PDPHY_RX_ACKNOWLEDGE_REG,
          345 &gt;                            &#38;val);
          346 &gt; @@ -244,10 +248,6 @@ qcom_pmic_typec_pdphy_pd_transmit_payload(struct pmic_typec_pdphy *pmic_typec_pd
          347 &gt;          if (ret)
          348 &gt;                  goto done;
          349 &gt;  
          350 &gt; -        hdr_len = sizeof(msg-&gt;header);
          351 &gt; -        txbuf_len = pd_header_cnt_le(msg-&gt;header) * 4;
          352 &gt; -        txsize_len = hdr_len + txbuf_len - 1;
          353 &gt; -
          354 &gt;          /* Write message header sizeof(u16) to USB_PDPHY_TX_BUFFER_HDR_REG */
          355 &gt;          ret = regmap_bulk_write(pmic_typec_pdphy-&gt;regmap,
          356 &gt;                                  pmic_typec_pdphy-&gt;base + USB_PDPHY_TX_BUFFER_HDR_REG,
          357 &gt; -- 
          358 &gt; 2.17.1
          359 &gt; 
          360 &gt; 
          361 </span></pre></div></content></entry><entry><author><name>Jonathan Cameron</name><email>jic23@kernel.org</email></author><title>Re: [PATCH v2 06/15] iio: light: adux1020: write_event_config: use local variable for interrupt value</title><updated>2024-11-01T15:45:04Z</updated><link
          362 href="http://lore.kernel.org/lkml/20241101154451.227defba@jic23-huawei/"/><id>urn:uuid:637122ea-f8ad-6028-0dd8-41c4bbc74581</id><thr:in-reply-to
          363 ref="urn:uuid:ee4c190c-4254-fe26-18b7-7c815612ce4c"
          364 href="http://lore.kernel.org/lkml/ef4fe230-b7fb-4f7e-9173-ae85d305e9ae@baylibre.com/"/><content
          365 type="xhtml"><div
          366 xmlns="http://www.w3.org/1999/xhtml"><pre
          367 style="white-space:pre-wrap">On Thu, 31 Oct 2024 11:27:45 -0500
          368 David Lechner &lt;dlechner@baylibre.com&gt; wrote:
          369 
          370 <span
          371 class="q">&gt; On 10/31/24 10:27 AM, Julien Stephan wrote:
          372 &gt; &gt; state parameter is currently an int, but it is actually a boolean.
          373 &gt; &gt; iio_ev_state_store is actually using kstrtobool to check user input,
          374 &gt; &gt; then gives the converted boolean value to write_event_config.  The code
          375 &gt; &gt; in adux1020_write_event_config re-uses state parameter to store an
          376 &gt; &gt; integer value. To prepare for updating the write_event_config signature
          377 &gt; &gt; to use a boolean for state, introduce a new local int variable.
          378 &gt; &gt; 
          379 &gt; &gt; Signed-off-by: Julien Stephan &lt;jstephan@baylibre.com&gt;
          380 &gt; &gt; ---
          381 &gt; &gt;  drivers/iio/light/adux1020.c | 8 ++++----
          382 &gt; &gt;  1 file changed, 4 insertions(+), 4 deletions(-)
          383 &gt; &gt; 
          384 &gt; &gt; diff --git a/drivers/iio/light/adux1020.c b/drivers/iio/light/adux1020.c
          385 &gt; &gt; index 2e0170be077aef9aa194fab51afbb33aec02e513..db57d84da616b91add8c5d1aba08a73ce18c367e 100644
          386 &gt; &gt; --- a/drivers/iio/light/adux1020.c
          387 &gt; &gt; +++ b/drivers/iio/light/adux1020.c
          388 &gt; &gt; @@ -505,7 +505,7 @@ static int adux1020_write_event_config(struct iio_dev *indio_dev,
          389 &gt; &gt;                                         enum iio_event_direction dir, int state)
          390 &gt; &gt;  {
          391 &gt; &gt;          struct adux1020_data *data = iio_priv(indio_dev);
          392 &gt; &gt; -        int ret, mask;
          393 &gt; &gt; +        int ret, mask, val;
          394 &gt; &gt;  
          395 &gt; &gt;          mutex_lock(&#38;data-&gt;lock);
          396 &gt; &gt;  
          397 &gt; &gt; @@ -526,12 +526,12 @@ static int adux1020_write_event_config(struct iio_dev *indio_dev,
          398 &gt; &gt;                          mask = ADUX1020_PROX_OFF1_INT;
          399 &gt; &gt;  
          400 &gt; &gt;                  if (state)
          401 &gt; &gt; -                        state = 0;
          402 &gt; &gt; +                        val = 0;
          403 &gt; &gt;                  else
          404 &gt; &gt; -                        state = mask;
          405 &gt; &gt; +                        val = mask;
          406 &gt; &gt;  
          407 &gt; &gt;                  ret = regmap_update_bits(data-&gt;regmap, ADUX1020_REG_INT_MASK,
          408 &gt; &gt; -                                         mask, state);
          409 &gt; &gt; +                                         mask, val);
          410 &gt; &gt;                  if (ret &lt; 0)
          411 &gt; &gt;                          goto fail;
          412 &gt; &gt;  
          413 &gt; &gt;   
          414 &gt; 
          415 &gt; Instead of introducing `val`, I would rewrite this as:
          416 &gt; 
          417 &gt;         if (state)
          418 &gt;                 ret = regmap_clear_bits(...);
          419 &gt;         else
          420 &gt;                 ret = regmap_set_bits(...);
          421 &gt; 
          422 </span>Good idea.  Rather than go around again and potentially stall the end of this series.
          423 I made that change whilst applying.  Shout if either of you doesn&#39;t
          424 like the result. Diff doesn&#39;t do a perfect job on readability (it does
          425 if I add a line break but then the code looks worse in the end!)
          426 
          427 From 06a1ca816450d1b5524f6010581a83ab9935d51b Mon Sep 17 00:00:00 2001
          428 From: Julien Stephan &lt;jstephan@baylibre.com&gt;
          429 Date: Thu, 31 Oct 2024 16:27:01 +0100
          430 Subject: [PATCH] iio: light: adux1020: write_event_config: use local variable
          431  for interrupt value
          432 
          433 state parameter is currently an int, but it is actually a boolean.
          434 iio_ev_state_store is actually using kstrtobool to check user input,
          435 then gives the converted boolean value to write_event_config.  The code
          436 in adux1020_write_event_config re-uses state parameter to store an
          437 integer value. To prepare for updating the write_event_config signature
          438 to use a boolean for state, introduce a new local int variable.
          439 
          440 Signed-off-by: Julien Stephan &lt;jstephan@baylibre.com&gt;
          441 Link: <a
          442 href="https://patch.msgid.link/20241031-iio-fix-write-event-config-signature-v2-6-2bcacbb517a2@baylibre.com">https://patch.msgid.link/20241031-iio-fix-write-event-config-signature-v2-6-2bcacbb517a2@baylibre.com</a>
          443 Signed-off-by: Jonathan Cameron &lt;Jonathan.Cameron@huawei.com&gt;
          444 ---
          445  drivers/iio/light/adux1020.c | 9 ++++-----
          446  1 file <a href="http://lore.kernel.org/lkml/20241101154451.227defba@jic23-huawei/#related">changed</a>, 4 insertions(+), 5 deletions(-)
          447 
          448 <span
          449 class="head">diff --git a/drivers/iio/light/adux1020.c b/drivers/iio/light/adux1020.c
          450 index 2e0170be077a..06d5bc1d246c 100644
          451 --- a/drivers/iio/light/adux1020.c
          452 +++ b/drivers/iio/light/adux1020.c
          453 </span><span
          454 class="hunk">@@ -526,12 +526,11 @@ static int adux1020_write_event_config(struct iio_dev *indio_dev,
          455 </span>                         mask = ADUX1020_PROX_OFF1_INT;
          456  
          457                  if (state)
          458 <span
          459 class="del">-                        state = 0;
          460 </span><span
          461 class="add">+                        ret = regmap_clear_bits(data-&gt;regmap,
          462 +                                                ADUX1020_REG_INT_MASK, mask);
          463 </span>                 else
          464 <span
          465 class="del">-                        state = mask;
          466 -
          467 -                ret = regmap_update_bits(data-&gt;regmap, ADUX1020_REG_INT_MASK,
          468 -                                         mask, state);
          469 </span><span
          470 class="add">+                        ret = regmap_set_bits(data-&gt;regmap,
          471 +                                              ADUX1020_REG_INT_MASK, mask);
          472 </span>                 if (ret &lt; 0)
          473                          goto fail;
          474  
          475 -- 
          476 2.46.2
          477 
          478 
          479 
          480 <span
          481 class="q">&gt; 
          482 &gt; 
          483 </span>
          484 </pre></div></content></entry><entry><author><name>Rob Herring (Arm)</name><email>robh@kernel.org</email></author><title>Re: [PATCH v2 1/3] dt-bindings: spi: apple,spi: Add binding for Apple SPI controllers</title><updated>2024-11-01T15:43:15Z</updated><link
          485 href="http://lore.kernel.org/lkml/173047579349.3488175.222264580667894425.robh@kernel.org/"/><id>urn:uuid:b34217b9-76fa-1d6a-6a04-f4acc7c05359</id><thr:in-reply-to
          486 ref="urn:uuid:854bcda4-a0b6-3948-c365-5fcf2e39136c"
          487 href="http://lore.kernel.org/lkml/20241101-asahi-spi-v2-1-763a8a84d834@jannau.net/"/><content
          488 type="xhtml"><div
          489 xmlns="http://www.w3.org/1999/xhtml"><pre
          490 style="white-space:pre-wrap">
          491 On Fri, 01 Nov 2024 15:25:03 +0100, Janne Grunau wrote:
          492 <span
          493 class="q">&gt; From: Hector Martin &lt;marcan@marcan.st&gt;
          494 &gt; 
          495 &gt; The Apple SPI controller is present in SoCs such as the M1 (t8103) and
          496 &gt; M1 Pro/Max (t600x). This controller uses one IRQ and one clock, and
          497 &gt; doesn&#39;t need any special properties, so the binding is trivial.
          498 &gt; 
          499 &gt; Signed-off-by: Hector Martin &lt;marcan@marcan.st&gt;
          500 &gt; Signed-off-by: Janne Grunau &lt;j@jannau.net&gt;
          501 &gt; ---
          502 &gt;  .../devicetree/bindings/spi/apple,spi.yaml         | 62 ++++++++++++++++++++++
          503 &gt;  1 file changed, 62 insertions(+)
          504 &gt; 
          505 </span>
          506 My bot found errors running &#39;make dt_binding_check&#39; on your patch:
          507 
          508 yamllint warnings/errors:
          509 ./Documentation/devicetree/bindings/spi/apple,spi.yaml:10:11: [error] string value is redundantly quoted with any quotes (quoted-strings)
          510 
          511 dtschema/dtc warnings/errors:
          512 
          513 doc reference errors (make refcheckdocs):
          514 
          515 See <a
          516 href="https://patchwork.ozlabs.org/project/devicetree-bindings/patch/20241101-asahi-spi-v2-1-763a8a84d834@jannau.net">https://patchwork.ozlabs.org/project/devicetree-bindings/patch/20241101-asahi-spi-v2-1-763a8a84d834@jannau.net</a>
          517 
          518 The base for the series is generally the latest rc1. A different dependency
          519 should be noted in *this* patch.
          520 
          521 If you already ran &#39;make dt_binding_check&#39; and didn&#39;t see the above
          522 error(s), then make sure &#39;yamllint&#39; is installed and dt-schema is up to
          523 date:
          524 
          525 pip3 install dtschema --upgrade
          526 
          527 Please check and re-submit after running the above command yourself. Note
          528 that DT_SCHEMA_FILES can be set to your schema file to speed up checking
          529 your schema. However, it must be unset to test all examples with your schema.
          530 
          531 </pre></div></content></entry><entry><author><name>Doug Anderson</name><email>dianders@chromium.org</email></author><title>Re: [PATCH] kdb: Fix incomplete usage help of md, mds and btc commands</title><updated>2024-11-01T15:43:04Z</updated><link
          532 href="http://lore.kernel.org/lkml/CAD=FV=XY-mH2FxnnMsA99jQ2ZCcd=psTn+VJ4R9h9htK-f2ihw@mail.gmail.com/"/><id>urn:uuid:dc6d9489-7717-219b-3de4-493fa30755bf</id><thr:in-reply-to
          533 ref="urn:uuid:26810420-d0a9-f486-7f7b-7f82c31643cf"
          534 href="http://lore.kernel.org/lkml/20241031204041.GA27585@lichtman.org/"/><content
          535 type="xhtml"><div
          536 xmlns="http://www.w3.org/1999/xhtml"><pre
          537 style="white-space:pre-wrap">Hi,
          538 
          539 On Thu, Oct 31, 2024 at 1:40&#8239;PM Nir Lichtman &lt;nir@lichtman.org&gt; wrote:
          540 <span
          541 class="q">&gt;
          542 &gt; Fix kdb usage help to document some currently missing CLI commands options
          543 &gt;
          544 &gt; Signed-off-by: Nir Lichtman &lt;nir@lichtman.org&gt;
          545 &gt; ---
          546 &gt;  kernel/debug/kdb/kdb_main.c | 8 ++++----
          547 &gt;  1 file changed, 4 insertions(+), 4 deletions(-)
          548 </span>
          549 Some of this is a bit similar to what I tried to do at :
          550 
          551 <a
          552 href="https://lore.kernel.org/r/20240617173426.2.I5621f286f5131c84ac71a212508ba1467ac443f2@changeid">https://lore.kernel.org/r/20240617173426.2.I5621f286f5131c84ac71a212508ba1467ac443f2@changeid</a>
          553 
          554 ...but that series kinda fell on the floor because my end goal was to
          555 try to get it so I could access IO memory and Daniel pointed out that
          556 what I was doing was unsafe. The earlier patches in the series are
          557 overall good cleanups, though. If you&#39;re interested feel free to
          558 iterate on any of them.
          559 
          560 
          561 <span
          562 class="q">&gt; diff --git a/kernel/debug/kdb/kdb_main.c b/kernel/debug/kdb/kdb_main.c
          563 &gt; index f5f7d7fb5936..0bdffb17b163 100644
          564 &gt; --- a/kernel/debug/kdb/kdb_main.c
          565 &gt; +++ b/kernel/debug/kdb/kdb_main.c
          566 &gt; @@ -2667,7 +2667,7 @@ EXPORT_SYMBOL_GPL(kdb_unregister);
          567 &gt;  static kdbtab_t maintab[] = {
          568 &gt;         {       .name = &#34;md&#34;,
          569 &gt;                 .func = kdb_md,
          570 &gt; -               .usage = &#34;&lt;vaddr&gt;&#34;,
          571 &gt; +               .usage = &#34;&lt;vaddr&gt; [lines] [radix]&#34;,
          572 </span>
          573 In my patch, I said:
          574 
          575 .usage = &#34;&lt;vaddr&gt; [&lt;lines&gt; [&lt;radix&gt;]]&#34;,
          576 
          577 ...so I had the &lt;&gt; characters and nested the []. I think that the &lt;&gt;
          578 is supposed to signify that you&#39;re not supposed to write the text
          579 &#34;lines&#34; but that it&#39;s a variable.
          580 
          581 
          582 <span
          583 class="q">&gt;                 .help = &#34;Display Memory Contents, also mdWcN, e.g. md8c1&#34;,
          584 &gt;                 .minlen = 1,
          585 &gt;                 .flags = KDB_ENABLE_MEM_READ | KDB_REPEAT_NO_ARGS,
          586 &gt; @@ -2686,7 +2686,7 @@ static kdbtab_t maintab[] = {
          587 &gt;         },
          588 &gt;         {       .name = &#34;mds&#34;,
          589 &gt;                 .func = kdb_md,
          590 &gt; -               .usage = &#34;&lt;vaddr&gt;&#34;,
          591 &gt; +               .usage = &#34;&lt;vaddr&gt; [lines] [radix]&#34;,
          592 </span>
          593 From my prior research, &#34;mds&#34; doesn&#39;t support &lt;radix&gt;. However, some
          594 of the other &#34;md&#34; commands that you didn&#39;t modify do support
          595 lines/radix. Let me know if I got that wrong.
          596 
          597 
          598 -Doug
          599 </pre></div></content></entry><entry><author><name>George Stark</name><email>gnstark@salutedevices.com</email></author><title>Re: [PATCH 2/2] leds: pwm: Add optional DT property default-brightness</title><updated>2024-11-01T15:42:38Z</updated><link
          600 href="http://lore.kernel.org/lkml/e37f23e6-f471-4061-b346-4b082f37060d@salutedevices.com/"/><id>urn:uuid:3725b04d-a9fc-e988-d606-967ab01b1b3f</id><thr:in-reply-to
          601 ref="urn:uuid:05782edb-e993-bc96-9aad-9dcb63b5ab56"
          602 href="http://lore.kernel.org/lkml/20241031143250.GH10824@google.com/"/><content
          603 type="xhtml"><div
          604 xmlns="http://www.w3.org/1999/xhtml"><pre
          605 style="white-space:pre-wrap">Hello Lee
          606 
          607 Thanks for the review!
          608 
          609 On 10/31/24 17:32, Lee Jones wrote:
          610 <span
          611 class="q">&gt; On Tue, 15 Oct 2024, George Stark wrote:
          612 &gt; 
          613 &gt;&gt; When probing if default LED state is on then default brightness will be
          614 &gt;&gt; applied instead of max brightness.
          615 &gt;&gt;
          616 &gt;&gt; Signed-off-by: George Stark &lt;gnstark@salutedevices.com&gt;
          617 &gt;&gt; ---
          618 &gt;&gt;   drivers/leds/leds-pwm.c | 13 ++++++++++---
          619 &gt;&gt;   1 file changed, 10 insertions(+), 3 deletions(-)
          620 &gt;&gt;
          621 &gt;&gt; diff --git a/drivers/leds/leds-pwm.c b/drivers/leds/leds-pwm.c
          622 &gt;&gt; index 7961dca0db2f..514fc8ca3e80 100644
          623 &gt;&gt; --- a/drivers/leds/leds-pwm.c
          624 &gt;&gt; +++ b/drivers/leds/leds-pwm.c
          625 &gt;&gt; @@ -65,7 +65,8 @@ static int led_pwm_set(struct led_classdev *led_cdev,
          626 &gt;&gt;   
          627 &gt;&gt;   __attribute__((nonnull))
          628 &gt;&gt;   static int led_pwm_add(struct device *dev, struct led_pwm_priv *priv,
          629 &gt;&gt; -                       struct led_pwm *led, struct fwnode_handle *fwnode)
          630 &gt;&gt; +                       struct led_pwm *led, struct fwnode_handle *fwnode,
          631 &gt;&gt; +                       unsigned int default_brightness)
          632 &gt;&gt;   {
          633 &gt;&gt;           struct led_pwm_data *led_data = &#38;priv-&gt;leds[priv-&gt;num_leds];
          634 &gt;&gt;           struct led_init_data init_data = { .fwnode = fwnode };
          635 &gt;&gt; @@ -104,7 +105,7 @@ static int led_pwm_add(struct device *dev, struct led_pwm_priv *priv,
          636 &gt;&gt;           /* set brightness */
          637 &gt;&gt;           switch (led-&gt;default_state) {
          638 &gt;&gt;           case LEDS_DEFSTATE_ON:
          639 &gt;&gt; -                led_data-&gt;cdev.brightness = led-&gt;max_brightness;
          640 &gt;&gt; +                led_data-&gt;cdev.brightness = default_brightness;
          641 &gt;&gt;                   break;
          642 &gt;&gt;           case LEDS_DEFSTATE_KEEP:
          643 &gt;&gt;                   {
          644 &gt;&gt; @@ -141,6 +142,7 @@ static int led_pwm_add(struct device *dev, struct led_pwm_priv *priv,
          645 &gt;&gt;   static int led_pwm_create_fwnode(struct device *dev, struct led_pwm_priv *priv)
          646 &gt;&gt;   {
          647 &gt;&gt;           struct led_pwm led;
          648 &gt;&gt; +        unsigned int default_brightness;
          649 &gt;&gt;           int ret;
          650 &gt;&gt;   
          651 &gt;&gt;           device_for_each_child_node_scoped(dev, fwnode) {
          652 &gt;&gt; @@ -160,7 +162,12 @@ static int led_pwm_create_fwnode(struct device *dev, struct led_pwm_priv *priv)
          653 &gt;&gt;   
          654 &gt;&gt;                   led.default_state = led_init_default_state_get(fwnode);
          655 &gt;&gt;   
          656 &gt;&gt; -                ret = led_pwm_add(dev, priv, &#38;led, fwnode);
          657 &gt;&gt; +                ret = fwnode_property_read_u32(fwnode, &#34;default-brightness&#34;,
          658 &gt;&gt; +                                               &#38;default_brightness);
          659 &gt;&gt; +                if (ret &lt; 0 || default_brightness &gt; led.max_brightness)
          660 &gt;&gt; +                        default_brightness = led.max_brightness;
          661 &gt;&gt; +
          662 &gt;&gt; +                ret = led_pwm_add(dev, priv, &#38;led, fwnode, default_brightness);
          663 &gt; 
          664 &gt; This creates a lot more hopping around than is necessary.
          665 &gt; 
          666 &gt; Since led_pwm_add() already has access to the fwnode, why not look up
          667 &gt; the property in there instead, thus massively simplifying things.
          668 </span>
          669 I looked up the new property here to be near to
          670 led_init_default_state_get (both props are from the same group) and
          671 led_pwm_add is big enough already. And you&#39;re absolutely right that the
          672 patch can be optimized. Please take a look at the v2
          673 
          674 <span
          675 class="q">&gt; 
          676 &gt; 
          677 &gt;&gt;                   if (ret)
          678 &gt;&gt;                           return ret;
          679 &gt;&gt;           }
          680 &gt;&gt; -- 
          681 &gt;&gt; 2.25.1
          682 &gt;&gt;
          683 &gt; 
          684 </span>
          685 -- 
          686 Best regards
          687 George
          688 </pre></div></content></entry><entry><author><name>Mathieu Poirier</name><email>mathieu.poirier@linaro.org</email></author><title>Re: [PATCH V5] remoteproc: Documentation: update with details</title><updated>2024-11-01T15:41:29Z</updated><link
          689 href="http://lore.kernel.org/lkml/ZyT2piU27MF28XcN@p14s/"/><id>urn:uuid:245ae693-dda8-67e2-5447-c96feb798e8f</id><thr:in-reply-to
          690 ref="urn:uuid:4ad4a1f2-5c65-5556-9d95-c1f0b643fadb"
          691 href="http://lore.kernel.org/lkml/20241026212259.31950-1-yesanishhere@gmail.com/"/><content
          692 type="xhtml"><div
          693 xmlns="http://www.w3.org/1999/xhtml"><pre
          694 style="white-space:pre-wrap">On Sat, Oct 26, 2024 at 02:22:59PM -0700, anish kumar wrote:
          695 <span
          696 class="q">&gt; Added details as below:
          697 &gt; 1. added sysfs information
          698 &gt; 2. verbose details about remoteproc driver/framework
          699 &gt;    responsibilites.
          700 &gt; 3. example for resource request
          701 &gt; 
          702 &gt; Signed-off-by: anish kumar &lt;yesanishhere@gmail.com&gt;
          703 &gt; ---
          704 &gt; V5:
          705 &gt; based on comment from mathieu poirier, remove all files
          706 &gt; and combined that in the original file and as he adviced
          707 &gt; nothing with respect to old documentation was changed.
          708 &gt; 
          709 &gt; V4:
          710 &gt; Fixed compilation errors and moved documentation to
          711 &gt; driver-api directory.
          712 &gt; 
          713 &gt; V3:
          714 &gt; Seperated out the patches further to make the intention
          715 &gt; clear for each patch.
          716 &gt; 
          717 &gt; V2:
          718 &gt; Reported-by: kernel test robot &lt;lkp@intel.com&gt;
          719 &gt; Closes: <a
          720 href="https://lore.kernel.org/oe-kbuild-all/202410161444.jOKMsoGS-lkp@intel.com/">https://lore.kernel.org/oe-kbuild-all/202410161444.jOKMsoGS-lkp@intel.com/</a>
          721 &gt; 
          722 &gt;  Documentation/staging/remoteproc.rst | 483 +++++++++++++++++++++++++++
          723 &gt;  1 file changed, 483 insertions(+)
          724 &gt; 
          725 &gt; diff --git a/Documentation/staging/remoteproc.rst b/Documentation/staging/remoteproc.rst
          726 &gt; index 348ee7e508ac..1c15f4d1b9eb 100644
          727 &gt; --- a/Documentation/staging/remoteproc.rst
          728 &gt; +++ b/Documentation/staging/remoteproc.rst
          729 &gt; @@ -29,6 +29,68 @@ remoteproc will add those devices. This makes it possible to reuse the
          730 &gt;  existing virtio drivers with remote processor backends at a minimal development
          731 &gt;  cost.
          732 &gt;  
          733 &gt; +The primary purpose of the remoteproc framework is to download firmware
          734 &gt; +for remote processors and manage their lifecycle. The framework consists
          735 &gt; +of several key components:
          736 &gt; +
          737 &gt; +- **Character Driver**: Provides userspace access to control the remote
          738 &gt; +  processor.
          739 &gt; +- **ELF Utility**: Offers functions for handling ELF files and managing
          740 &gt; +  resources requested by the remote processor.
          741 &gt; +- **Remoteproc Core**: Manages firmware downloads and recovery actions
          742 &gt; +  in case of a remote processor crash.
          743 &gt; +- **Coredump**: Provides facilities for coredumping and tracing from
          744 &gt; +  the remote processor in the event of a crash.
          745 &gt; +- **Userspace Interaction**: Uses sysfs and debugfs to manage the
          746 &gt; +  lifecycle and status of the remote processor.
          747 &gt; +- **Virtio Support**: Facilitates interaction with the virtio and
          748 &gt; +  rpmsg bus.
          749 &gt; +
          750 &gt; +Remoteproc framework Responsibilities
          751 &gt; +=====================================
          752 &gt; +
          753 &gt; +The framework begins by gathering information about the firmware file
          754 &gt; +to be downloaded through the request_firmware function. It supports
          755 &gt; +the ELF format and parses the firmware image to identify the physical
          756 &gt; +addresses that need to be populated from the corresponding ELF sections.
          757 &gt; +The framework also requires knowledge of the logical or I/O-mapped
          758 &gt; +addresses in the application processor. Once this information is
          759 </span>
          760 &#34;The framework also requires knowledge of the logical or I/O-mapped addresses in
          761 the application processor&#34;. What is that about?
          762 
          763 <span
          764 class="q">&gt; +obtained from the driver, the framework transfers the data to the
          765 &gt; +specified addresses and starts the remote, along with
          766 </span>
          767 &#34;remote&#34; what?
          768 
          769 <span
          770 class="q">&gt; +any devices physically or logically connected to it.
          771 </span>
          772 I have never seen this happening.
          773 
          774 <span
          775 class="q">&gt; +
          776 &gt; +Dependent devices, referred to as `subdevices` within the framework,
          777 &gt; +are also managed post-registration by their respective drivers.
          778 &gt; +Subdevices can register themselves using `rproc_(add/remove)_subdev`.
          779 &gt; +Non-remoteproc drivers can use subdevices as a way to logically connect
          780 &gt; +to remote and get lifecycle notifications of the remote.
          781 &gt; +
          782 &gt; +The framework oversees the lifecycle of the remote and
          783 &gt; +provides the `rproc_report_crash` function, which the driver invokes
          784 &gt; +upon receiving a crash notification from the remote. The
          785 &gt; +notification method can differ based on the design of the remote
          786 &gt; +processor and its communication with the application processor. For
          787 &gt; +instance, if the remote is a DSP equipped with a watchdog,
          788 &gt; +unresponsive behavior triggers the watchdog, generating an interrupt
          789 &gt; +that routes to the application processor, allowing it to call
          790 &gt; +`rproc_report_crash` in the driver&#39;s interrupt context.
          791 &gt; +
          792 &gt; +During crash handling, the framework performs the following actions:
          793 &gt; +
          794 &gt; +a. Sends a request to stop the remote and any connected or
          795 &gt; +   dependent subdevices.
          796 &gt; +b. Generates a coredump, dumping all `resources` requested by the
          797 &gt; +   remote alongside relevant debugging information. Resources are
          798 &gt; +   explained below.
          799 &gt; +c. Reloads the firmware and restarts the remote.
          800 &gt; +
          801 &gt; +If the `RPROC_FEAT_ATTACH_ON_RECOVERY` flag is set, the detach and
          802 &gt; +attach callbacks of the driver are invoked without reloading the
          803 &gt; +firmware. This is useful when the remote requires no
          804 &gt; +assistance for recovery, or when the application processor can restart
          805 &gt; +independently. After recovery, the application processor can reattach
          806 &gt; +to the remote.
          807 &gt; +
          808 </span>
          809 The above provides a description of some of the things the remoteproc subsystem
          810 does and as such, I would call it &#34;overview&#34; rather than responsabilities.
          811 
          812 <span
          813 class="q">&gt;  User API
          814 &gt;  ========
          815 &gt;  
          816 &gt; @@ -107,6 +169,239 @@ Typical usage
          817 &gt;  API for implementors
          818 &gt;  ====================
          819 &gt;  
          820 &gt; +It describes the API that can be used by remote processor Drivers
          821 &gt; +that want to use the remote processor Driver Core Framework. This
          822 &gt; +framework provides all interfacing towards user space so that the
          823 &gt; +same code does not have to be reproduced each time. This also means
          824 &gt; +that a remote processor driver then only needs to provide the different
          825 &gt; +routines(operations) that control the remote processor.
          826 &gt; +
          827 &gt; +Each remote processor driver that wants to use the remote processor Driver Core
          828 &gt; +must #include &lt;linux/remoteproc.h&gt; (you would have to do this anyway when
          829 &gt; +writing a rproc device driver). This include file contains following
          830 &gt; +register routine::
          831 &gt; +
          832 </span>
          833 The above is very basic information about subsystems in general - please remove.
          834 
          835 <span
          836 class="q">&gt; +        int devm_rproc_add(struct device *dev, struct rproc *rproc)
          837 &gt; +
          838 &gt; +The devm_rproc_add routine registers a remote processor device.
          839 &gt; +The parameter of this routine is a pointer to a rproc device structure.
          840 &gt; +This routine returns zero on success and a negative errno code for failure.
          841 </span>
          842 Look at what is documented for other API functions and do the same here.  
          843 
          844 <span
          845 class="q">&gt; +
          846 &gt; +The rproc device structure looks like this::
          847 &gt; +
          848 &gt; +  struct rproc {
          849 &gt; +        struct list_head node;
          850 &gt; +        struct iommu_domain *domain;
          851 &gt; +        const char *name;
          852 &gt; +        const char *firmware;
          853 &gt; +        void *priv;
          854 &gt; +        struct rproc_ops *ops;
          855 &gt; +        struct device dev;
          856 &gt; +        atomic_t power;
          857 &gt; +        unsigned int state;
          858 &gt; +        enum rproc_dump_mechanism dump_conf;
          859 &gt; +        struct mutex lock;
          860 &gt; +        struct dentry *dbg_dir;
          861 &gt; +        struct list_head traces;
          862 &gt; +        int num_traces;
          863 &gt; +        struct list_head carveouts;
          864 &gt; +        struct list_head mappings;
          865 &gt; +        u64 bootaddr;
          866 &gt; +        struct list_head rvdevs;
          867 &gt; +        struct list_head subdevs;
          868 &gt; +        struct idr notifyids;
          869 &gt; +        int index;
          870 &gt; +        struct work_struct crash_handler;
          871 &gt; +        unsigned int crash_cnt;
          872 &gt; +        bool recovery_disabled;
          873 &gt; +        int max_notifyid;
          874 &gt; +        struct resource_table *table_ptr;
          875 &gt; +        struct resource_table *clean_table;
          876 &gt; +        struct resource_table *cached_table;
          877 &gt; +        size_t table_sz;
          878 &gt; +        bool has_iommu;
          879 &gt; +        bool auto_boot;
          880 &gt; +        bool sysfs_read_only;
          881 &gt; +        struct list_head dump_segments;
          882 &gt; +        int nb_vdev;
          883 &gt; +        u8 elf_class;
          884 &gt; +        u16 elf_machine;
          885 &gt; +        struct cdev cdev;
          886 &gt; +        bool cdev_put_on_release;
          887 &gt; +        DECLARE_BITMAP(features, RPROC_MAX_FEATURES);
          888 &gt; +  };
          889 </span>
          890 All that is already part of remoteproc.h and doesn&#39;t need to be duplicated here
          891 - please remove.
          892 
          893 <span
          894 class="q">&gt; +
          895 &gt; +It contains following fields:
          896 &gt; +
          897 &gt; +* node: list node of this rproc object
          898 &gt; +* domain: iommu domain
          899 &gt; +* name: human readable name of the rproc
          900 &gt; +* firmware: name of firmware file to be loaded
          901 &gt; +* priv: private data which belongs to the platform-specific rproc module
          902 &gt; +* ops: platform-specific start/stop rproc handlers
          903 &gt; +* dev: virtual device for refcounting and common remoteproc behavior
          904 &gt; +* power: refcount of users who need this rproc powered up
          905 &gt; +* state: state of the device
          906 &gt; +* dump_conf: Currently selected coredump configuration
          907 &gt; +* lock: lock which protects concurrent manipulations of the rproc
          908 &gt; +* dbg_dir: debugfs directory of this rproc device
          909 &gt; +* traces: list of trace buffers
          910 &gt; +* num_traces: number of trace buffers
          911 &gt; +* carveouts: list of physically contiguous memory allocations
          912 &gt; +* mappings: list of iommu mappings we initiated, needed on shutdown
          913 &gt; +* bootaddr: address of first instruction to boot rproc with (optional)
          914 &gt; +* rvdevs: list of remote virtio devices
          915 &gt; +* subdevs: list of subdevices, to following the running state
          916 &gt; +* notifyids: idr for dynamically assigning rproc-wide unique notify ids
          917 &gt; +* index: index of this rproc device
          918 &gt; +* crash_handler: workqueue for handling a crash
          919 &gt; +* crash_cnt: crash counter
          920 &gt; +* recovery_disabled: flag that state if recovery was disabled
          921 &gt; +* max_notifyid: largest allocated notify id.
          922 &gt; +* table_ptr: pointer to the resource table in effect
          923 &gt; +* clean_table: copy of the resource table without modifications.  Used
          924 &gt; +*               when a remote processor is attached or detached from the core
          925 &gt; +* cached_table: copy of the resource table
          926 &gt; +* table_sz: size of @cached_table
          927 &gt; +* has_iommu: flag to indicate if remote processor is behind an MMU
          928 &gt; +* auto_boot: flag to indicate if remote processor should be auto-started
          929 &gt; +* sysfs_read_only: flag to make remoteproc sysfs files read only
          930 &gt; +* dump_segments: list of segments in the firmware
          931 &gt; +* nb_vdev: number of vdev currently handled by rproc
          932 &gt; +* elf_class: firmware ELF class
          933 &gt; +* elf_machine: firmware ELF machine
          934 &gt; +* cdev: character device of the rproc
          935 &gt; +* cdev_put_on_release: flag to indicate if remoteproc should be shutdown on @char_dev release
          936 &gt; +* features: indicate remoteproc features
          937 &gt; +
          938 </span>
          939 Remove
          940 
          941 <span
          942 class="q">&gt; +The list of rproc operations is defined as::
          943 &gt; +
          944 &gt; +  struct rproc_ops {
          945 &gt; +        int (*prepare)(struct rproc *rproc);
          946 &gt; +        int (*unprepare)(struct rproc *rproc);
          947 &gt; +        int (*start)(struct rproc *rproc);
          948 &gt; +        int (*stop)(struct rproc *rproc);
          949 &gt; +        int (*attach)(struct rproc *rproc);
          950 &gt; +        int (*detach)(struct rproc *rproc);
          951 &gt; +        void (*kick)(struct rproc *rproc, int vqid);
          952 &gt; +        void * (*da_to_va)(struct rproc *rproc, u64 da, size_t len, bool *is_iomem);
          953 &gt; +        int (*parse_fw)(struct rproc *rproc, const struct firmware *fw);
          954 &gt; +        int (*handle_rsc)(struct rproc *rproc, u32 rsc_type, void *rsc,
          955 &gt; +                          int offset, int avail);
          956 &gt; +        struct resource_table *(*find_loaded_rsc_table)(
          957 &gt; +                                struct rproc *rproc, const struct firmware *fw);
          958 &gt; +        struct resource_table *(*get_loaded_rsc_table)(
          959 &gt; +                                struct rproc *rproc, size_t *size);
          960 &gt; +        int (*load)(struct rproc *rproc, const struct firmware *fw);
          961 &gt; +        int (*sanity_check)(struct rproc *rproc, const struct firmware *fw);
          962 &gt; +        u64 (*get_boot_addr)(struct rproc *rproc, const struct firmware *fw);
          963 &gt; +        unsigned long (*panic)(struct rproc *rproc);
          964 &gt; +        void (*coredump)(struct rproc *rproc);
          965 &gt; +  };
          966 &gt; +
          967 </span>
          968 If you really want to document all the callbacks, it should be done in the
          969 &#34;Implementation callbacks&#34; section following the style that is already in place.
          970 
          971 <span
          972 class="q">&gt; +Most of the operations are optional. Currently in the implementation
          973 &gt; +there are no mandatory operations, however from the practical standpoint
          974 &gt; +minimum ops are:
          975 &gt; +
          976 &gt; +* start: this is a pointer to the routine that starts the remote processor
          977 &gt; +  device.
          978 &gt; +  The routine needs a pointer to the remote processor device structure as a
          979 &gt; +  parameter. It returns zero on success or a negative errno code for failure.
          980 &gt; +
          981 &gt; +* stop: with this routine the remote processor device is being stopped.
          982 &gt; +
          983 &gt; +  The routine needs a pointer to the remote processor device structure as a
          984 &gt; +  parameter. It returns zero on success or a negative errno code for failure.
          985 &gt; +
          986 &gt; +* da_to_va: this is the routine that needs to translate device address to
          987 &gt; +  application processor virtual address that it can copy code to.
          988 &gt; +
          989 &gt; +  The routine needs a pointer to the remote processor device structure as a
          990 &gt; +  parameter. It returns zero on success or a negative errno code for failure.
          991 &gt; +
          992 &gt; +  The routine provides the device address it finds in the ELF firmware and asks
          993 &gt; +  the driver to convert that to virtual address.
          994 &gt; +
          995 &gt; +All other callbacks are optional in case of ELF provided firmware.
          996 &gt; +
          997 &gt; +* load: this is to load the firmware on to the remote device.
          998 &gt; +
          999 &gt; +  The routine needs firmware file that it needs to load on to the remote processor.
         1000 &gt; +  If the driver overrides this callback then default ELF loader will not get used.
         1001 &gt; +  Otherwise default framework provided loader gets used.
         1002 &gt; +
         1003 &gt; +  load = rproc_elf_load_segments;
         1004 &gt; +  parse_fw = rproc_elf_load_rsc_table;
         1005 &gt; +  find_loaded_rsc_table = rproc_elf_find_loaded_rsc_table;
         1006 &gt; +  sanity_check = rproc_elf_sanity_check;
         1007 &gt; +  get_boot_addr = rproc_elf_get_boot_addr;
         1008 &gt; +
         1009 &gt; +* parse_fw: this routing parses the provided firmware. In case of ELF format,
         1010 &gt; +  framework provided rproc_elf_load_rsc_table function can be used.
         1011 &gt; +
         1012 &gt; +* sanity_check: Check the format of the firmware.
         1013 &gt; +
         1014 &gt; +* coredump: If the driver prefers to manage coredumps independently, it can
         1015 &gt; +  implement its own coredump handling. However, the framework offers a default
         1016 &gt; +  implementation for the ELF format by assigning this callback to
         1017 &gt; +  rproc_coredump, unless the driver has overridden it.
         1018 &gt; +
         1019 &gt; +* get_boot_addr: In case the bootaddr defined in ELF firmware is different, driver
         1020 &gt; +  can use this callback to set a different boot address for remote processor to
         1021 &gt; +  starts its reset vector from.
         1022 &gt; +
         1023 &gt; +* find_loaded_rsc_table: this routine gets the loaded resource table from the firmware.
         1024 &gt; +
         1025 &gt; +  resource table should have a section named (.resource_table) for the framework
         1026 &gt; +  to understand and interpret its content. Resource table is a way for remote
         1027 &gt; +  processor to ask for resources such as memory for dumping and logging. Look
         1028 &gt; +  at core documentation to know how to create the ELF section for the same.
         1029 &gt; +
         1030 &gt; +* get_loaded_rsc_table: Driver can customize passing the resource table by overriding
         1031 &gt; +  this callback. Framework doesn&#39;t provide any default implementation for the same.
         1032 &gt; +
         1033 &gt; +The driver must provide the following information to the core:
         1034 &gt; +
         1035 &gt; +a. Translate device addresses (physical addresses) found in the ELF
         1036 &gt; +   firmware to virtual addresses in Linux using the `da_to_va`
         1037 &gt; +   callback. This allows the framework to copy ELF firmware from the
         1038 &gt; +   filesystem to the addresses expected by the remote since
         1039 &gt; +   the framework cannot directly access those physical addresses.
         1040 &gt; +b. Prepare/unprepare the remote prior to firmware loading,
         1041 &gt; +   which may involve allocating carveout and reserved memory regions.
         1042 &gt; +c. Implement methods for starting and stopping the remote,
         1043 &gt; +   whether by setting registers or sending explicit interrupts,
         1044 &gt; +   depending on the hardware design.
         1045 &gt; +d. Provide attach and detach callbacks to start the remote
         1046 &gt; +   without loading the firmware. This is beneficial when the remote
         1047 &gt; +   processor is already loaded and running.
         1048 &gt; +e. Implement a load callback for firmware loading, typically using
         1049 &gt; +   the ELF loader provided by the framework; currently, only ELF
         1050 &gt; +   format is supported.
         1051 &gt; +f. Invoke the framework&#39;s crash handler API upon detecting a remote
         1052 &gt; +   crash.
         1053 &gt; +
         1054 &gt; +Drivers must fill the `rproc_ops` structure and call `rproc_alloc`
         1055 &gt; +to register themselves with the framework.
         1056 &gt; +
         1057 &gt; +.. code-block:: c
         1058 &gt; +
         1059 &gt; +   struct rproc_ops {
         1060 &gt; +       int (*prepare)(struct rproc *rproc);
         1061 &gt; +       int (*unprepare)(struct rproc *rproc);
         1062 &gt; +       int (*start)(struct rproc *rproc);
         1063 &gt; +       int (*stop)(struct rproc *rproc);
         1064 &gt; +       int (*attach)(struct rproc *rproc);
         1065 &gt; +       int (*detach)(struct rproc *rproc);
         1066 &gt; +       void * (*da_to_va)(struct rproc *rproc, u64 da, size_t len,
         1067 &gt; +                          bool *is_iomem);
         1068 &gt; +       int (*parse_fw)(struct rproc *rproc, const struct firmware *fw);
         1069 &gt; +       int (*handle_rsc)(struct rproc *rproc, u32 rsc_type,
         1070 &gt; +                         void *rsc, int offset, int avail);
         1071 &gt; +       int (*load)(struct rproc *rproc, const struct firmware *fw);
         1072 &gt; +       //snip
         1073 &gt; +   };
         1074 </span>
         1075 This is already added above, why is it repeated here?
         1076 
         1077 <span
         1078 class="q">&gt; +
         1079 &gt;  ::
         1080 &gt;  
         1081 &gt;    struct rproc *rproc_alloc(struct device *dev, const char *name,
         1082 &gt; @@ -190,6 +485,35 @@ platform specific rproc implementation. This should not be called from a
         1083 &gt;  non-remoteproc driver. This function can be called from atomic/interrupt
         1084 &gt;  context.
         1085 &gt;  
         1086 &gt; +To add a subdev corresponding driver can call
         1087 &gt; +
         1088 &gt; +::
         1089 &gt; +
         1090 &gt; +  void rproc_add_subdev(struct rproc *rproc, struct rproc_subdev *subdev)
         1091 &gt; +
         1092 &gt; +To remove a subdev, driver can call.
         1093 &gt; +
         1094 &gt; +::
         1095 &gt; +
         1096 &gt; +  void rproc_remove_subdev(struct rproc *rproc, struct rproc_subdev *subdev)
         1097 &gt; +
         1098 </span>
         1099 The above doesn&#39;t add value to the documentation and users needing to use these
         1100 functions will need to look at the code anyway - please remove.
         1101 
         1102 <span
         1103 class="q">&gt; +To work with ELF coredump below function can be called
         1104 &gt; +
         1105 &gt; +::
         1106 &gt; +
         1107 &gt; +  void rproc_coredump_cleanup(struct rproc *rproc)
         1108 &gt; +  void rproc_coredump(struct rproc *rproc)
         1109 &gt; +  void rproc_coredump_using_sections(struct rproc *rproc)
         1110 &gt; +  int rproc_coredump_add_segment(struct rproc *rproc, dma_addr_t da, size_t size)
         1111 &gt; +  int rproc_coredump_add_custom_segment(struct rproc *rproc,
         1112 &gt; +                                        dma_addr_t da, size_t size,
         1113 &gt; +                                        void (*dumpfn)(struct rproc *rproc,
         1114 &gt; +                                        struct rproc_dump_segment *segment,
         1115 &gt; +                                        void *dest, size_t offset,
         1116 &gt; +                                        size_t size))
         1117 &gt; +
         1118 &gt; +Remember that coredump functions provided by the framework only works with ELF format.
         1119 &gt; +
         1120 </span>
         1121 Remove
         1122 
         1123 <span
         1124 class="q">&gt;  Implementation callbacks
         1125 &gt;  ========================
         1126 &gt;  
         1127 &gt; @@ -228,6 +552,123 @@ the exact virtqueue index to look in is optional: it is easy (and not
         1128 &gt;  too expensive) to go through the existing virtqueues and look for new buffers
         1129 &gt;  in the used rings.
         1130 &gt;  
         1131 &gt; +Userspace control methods
         1132 &gt; +==========================
         1133 &gt; +
         1134 &gt; +At times, userspace may need to check the state of the remote processor to
         1135 &gt; +prevent other processes from using it. For instance, if the remote processor
         1136 &gt; +is a DSP used for playback, there may be situations where the DSP is
         1137 &gt; +undergoing recovery and cannot be used. In such cases, attempts to access the
         1138 &gt; +DSP for playback should be blocked. The rproc framework provides sysfs APIs
         1139 &gt; +to inform userspace of the processor&#39;s current status which should be utilised
         1140 &gt; +to achieve the same.
         1141 &gt; +
         1142 </span>
         1143 Remove
         1144 
         1145 <span
         1146 class="q">&gt; +Additionally, there are scenarios where userspace applications need to explicitly
         1147 &gt; +control the rproc. In these cases, rproc also offers the file descriptors.
         1148 &gt; +
         1149 &gt; +Below set of commands can be used to start and stop the rproc
         1150 &gt; +where &#39;X&#39; refers to instance of associated remoteproc. There can be systems
         1151 &gt; +where there are more than one rprocs such as multiple DSP&#39;s
         1152 &gt; +connected to application processors running Linux.
         1153 &gt; +
         1154 &gt; +.. code-block:: c
         1155 &gt; +
         1156 &gt; +   echo start &gt; /sys/class/remoteproc/remoteprocX/state
         1157 &gt; +   echo stop &gt; /sys/class/remoteproc/remoteprocX/state
         1158 &gt; +
         1159 &gt; +To know the state of rproc:
         1160 &gt; +
         1161 &gt; +.. code-block:: c
         1162 &gt; +
         1163 &gt; +   cat /sys/class/remoteproc/remoteprocX/state
         1164 &gt; +
         1165 &gt; +
         1166 &gt; +To dynamically replace firmware, execute the following commands:
         1167 &gt; +
         1168 &gt; +.. code-block:: c
         1169 &gt; +
         1170 &gt; +   echo stop &gt; /sys/class/remoteproc/remoteprocX/state
         1171 &gt; +   echo -n &lt;firmware_name&gt; &gt;
         1172 &gt; +   /sys/class/remoteproc/remoteprocX/firmware
         1173 &gt; +   echo start &gt; /sys/class/remoteproc/remoteprocX/state
         1174 &gt; +
         1175 &gt; +To simulate a remote crash, execute:
         1176 &gt; +
         1177 &gt; +.. code-block:: c
         1178 &gt; +
         1179 &gt; +   echo 1 &gt; /sys/kernel/debug/remoteproc/remoteprocX/crash
         1180 &gt; +
         1181 &gt; +To get the trace logs, execute
         1182 &gt; +
         1183 &gt; +.. code-block:: c
         1184 &gt; +
         1185 &gt; +   cat /sys/kernel/debug/remoteproc/remoteprocX/crashX
         1186 &gt; +
         1187 &gt; +where X will be 0 or 1 if there are 2 resources. Also, this
         1188 &gt; +file will only exist if resources are defined in ELF firmware
         1189 &gt; +file.
         1190 &gt; +
         1191 &gt; +The coredump feature can be disabled with the following command:
         1192 &gt; +
         1193 &gt; +.. code-block:: c
         1194 &gt; +
         1195 &gt; +   echo disabled &gt; /sys/kernel/debug/remoteproc/remoteprocX/coredump
         1196 &gt; +
         1197 &gt; +Userspace can also control start/stop of rproc by using a
         1198 </span>
         1199 s/rproc/remote processor
         1200 
         1201 <span
         1202 class="q">&gt; +remoteproc Character Device, it can open the open a file descriptor
         1203 </span>
         1204 s/Character Device/character device
         1205 
         1206 <span
         1207 class="q">&gt; +and write `start` to initiate it, and `stop` to terminate it.
         1208 &gt; +Below set of api&#39;s can be used to start and stop the rproc
         1209 &gt; +where &#39;X&#39; refers to instance of associated remoteproc. There can be systems
         1210 &gt; +where there are more than one rprocs such as multiple DSP&#39;s
         1211 &gt; +connected to application processors running Linux.
         1212 </span>
         1213 Duplication from above - remove.
         1214 
         1215 <span
         1216 class="q">&gt; +
         1217 &gt; +.. code-block:: c
         1218 &gt; +
         1219 &gt; +   echo start &gt; /sys/class/remoteproc/remoteprocX/state
         1220 &gt; +   echo stop &gt; /sys/class/remoteproc/remoteprocX/state
         1221 &gt; +
         1222 &gt; +To know the state of rproc:
         1223 &gt; +
         1224 &gt; +.. code-block:: c
         1225 &gt; +
         1226 &gt; +   cat /sys/class/remoteproc/remoteprocX/state
         1227 &gt; +
         1228 </span>
         1229 Remove
         1230 
         1231 <span
         1232 class="q">&gt; +
         1233 &gt; +To dynamically replace firmware, execute the following commands:
         1234 &gt; +
         1235 &gt; +.. code-block:: c
         1236 &gt; +
         1237 &gt; +   echo stop &gt; /sys/class/remoteproc/remoteprocX/state
         1238 &gt; +   echo -n &lt;firmware_name&gt; &gt;
         1239 &gt; +   /sys/class/remoteproc/remoteprocX/firmware
         1240 &gt; +   echo start &gt; /sys/class/remoteproc/remoteprocX/state
         1241 &gt; +
         1242 &gt; +To simulate a remote crash, execute:
         1243 &gt; +
         1244 &gt; +.. code-block:: c
         1245 &gt; +
         1246 &gt; +   echo 1 &gt; /sys/kernel/debug/remoteproc/remoteprocX/crash
         1247 &gt; +
         1248 &gt; +To get the trace logs, execute
         1249 &gt; +
         1250 &gt; +.. code-block:: c
         1251 &gt; +
         1252 &gt; +   cat /sys/kernel/debug/remoteproc/remoteprocX/crashX
         1253 &gt; +
         1254 &gt; +where X will be 0 or 1 if there are 2 resources. Also, this
         1255 &gt; +file will only exist if resources are defined in ELF firmware
         1256 &gt; +file.
         1257 &gt; +
         1258 &gt; +The coredump feature can be disabled with the following command:
         1259 &gt; +
         1260 &gt; +.. code-block:: c
         1261 &gt; +
         1262 &gt; +   echo disabled &gt; /sys/kernel/debug/remoteproc/remoteprocX/coredump
         1263 &gt; +
         1264 &gt; +Userspace can also control start/stop of rproc by using a
         1265 &gt; +remoteproc Character Device, it can open the open a file descriptor
         1266 &gt; +and write `start` to initiate it, and `stop` to terminate it.
         1267 </span>
         1268 Duplication from above - remove.
         1269 
         1270 <span
         1271 class="q">&gt; +
         1272 &gt;  Binary Firmware Structure
         1273 &gt;  =========================
         1274 &gt;  
         1275 &gt; @@ -340,6 +781,48 @@ We also expect that platform-specific resource entries will show up
         1276 &gt;  at some point. When that happens, we could easily add a new RSC_PLATFORM
         1277 &gt;  type, and hand those resources to the platform-specific rproc driver to handle.
         1278 &gt;  
         1279 &gt; +if the remote requests both `RSC_TRACE` and `RSC_CARVEOUT` for memory
         1280 &gt; +allocation, the ELF firmware can be structured as follows:
         1281 &gt; +
         1282 &gt; +.. code-block:: c
         1283 &gt; +
         1284 &gt; +   #define MAX_SHARED_RESOURCE 2
         1285 &gt; +   #define LOG_BUF_SIZE 1000
         1286 &gt; +   #define CARVEOUT_DUMP_PA 0x12345678
         1287 &gt; +   #define CARVEOUT_DUMP_SIZE 2000
         1288 &gt; +
         1289 &gt; +   struct shared_resource_table {
         1290 &gt; +       u32 ver;
         1291 &gt; +       u32 num;
         1292 &gt; +       u32 reserved[2];
         1293 &gt; +       u32 offset[MAX_SHARED_RESOURCE];
         1294 &gt; +       struct fw_rsc_trace log_trace;
         1295 &gt; +       struct fw_rsc_carveout dump_carveout;
         1296 &gt; +   };
         1297 &gt; +
         1298 &gt; +   volatile struct shared_resource_table table = {
         1299 &gt; +       .ver = 1,
         1300 &gt; +       .num = 2,
         1301 &gt; +       .reserved = {0, 0},
         1302 &gt; +       .offset = {
         1303 &gt; +           offsetof(struct resource_table, log_trace),
         1304 &gt; +           offsetof(struct resource_table, dump_carveout),
         1305 &gt; +       },
         1306 &gt; +       .log_trace = {
         1307 &gt; +           RSC_TRACE,
         1308 &gt; +           (u32)log_buf, LOG_BUF_SIZE, 0, &#34;log_trace&#34;,
         1309 &gt; +       },
         1310 &gt; +       .dump_carveout = {
         1311 &gt; +           RSC_CARVEOUT,
         1312 &gt; +           (u32)FW_RSC_ADDR_ANY, CARVEOUT_PA, 0, &#34;carveout_dump&#34;,
         1313 &gt; +       },
         1314 &gt; +   };
         1315 &gt; +
         1316 &gt; +The framework creates a sysfs file when it encounters the `RSC_TRACE`
         1317 &gt; +type to expose log information to userspace. Other resource types are
         1318 &gt; +handled accordingly. In the example above, `CARVEOUT_DUMP_SIZE` bytes
         1319 &gt; +of DMA memory will be allocated starting from `CARVEOUT_DUMP_PA`.
         1320 &gt; +
         1321 </span>
         1322 Remove
         1323 
         1324 <span
         1325 class="q">&gt;  Virtio and remoteproc
         1326 &gt;  =====================
         1327 &gt;  
         1328 </span>
         1329 Before spinning off another revision I encourage you to spend time looking at
         1330 existing documentation.  Reading various mailing lists with a special
         1331 focus on how people split their patches based on topics would also be
         1332 beneficial.
         1333 
         1334 Lastly, typing my email address correctly would be highly appreciated.
         1335 
         1336 Thanks,
         1337 Mathieu
         1338 
         1339 <span
         1340 class="q">&gt; -- 
         1341 &gt; 2.39.3 (Apple Git-146)
         1342 &gt; 
         1343 &gt; 
         1344 </span></pre></div></content></entry><entry><author><name>Borislav Petkov</name><email>bp@alien8.de</email></author><title>Re: [PATCH v5 0/4] Distinguish between variants of IBPB</title><updated>2024-11-01T15:41:19Z</updated><link
         1345 href="http://lore.kernel.org/lkml/20241101153857.GAZyT2EdLXKs7ZmDFx@fat_crate.local/"/><id>urn:uuid:87315698-5cce-93e0-116f-32d3d054c439</id><thr:in-reply-to
         1346 ref="urn:uuid:7848ad27-59f2-66a2-0604-1759555ec538"
         1347 href="http://lore.kernel.org/lkml/173039500211.1507616.16831780895322741303.b4-ty@google.com/"/><content
         1348 type="xhtml"><div
         1349 xmlns="http://www.w3.org/1999/xhtml"><pre
         1350 style="white-space:pre-wrap">On Thu, Oct 31, 2024 at 12:51:33PM -0700, Sean Christopherson wrote:
         1351 <span
         1352 class="q">&gt; [1/4] x86/cpufeatures: Clarify semantics of X86_FEATURE_IBPB
         1353 &gt;       <a
         1354 href="https://github.com/kvm-x86/linux/commit/43801a0dbb38">https://github.com/kvm-x86/linux/commit/43801a0dbb38</a>
         1355 &gt; [2/4] x86/cpufeatures: Define X86_FEATURE_AMD_IBPB_RET
         1356 &gt;       <a
         1357 href="https://github.com/kvm-x86/linux/commit/99d252e3ae3e">https://github.com/kvm-x86/linux/commit/99d252e3ae3e</a>
         1358 </span>
         1359 ff898623af2e (&#34;x86/cpufeatures: Define X86_FEATURE_AMD_IBPB_RET&#34;)
         1360 
         1361 -- 
         1362 Regards/Gruss,
         1363     Boris.
         1364 
         1365 <a
         1366 href="https://people.kernel.org/tglx/notes-about-netiquette">https://people.kernel.org/tglx/notes-about-netiquette</a>
         1367 </pre></div></content></entry><entry><author><name>Krzysztof Kozlowski</name><email>krzk@kernel.org</email></author><title>Re: [PATCH v4 14/16] net: stmmac: dwmac-s32: add basic NXP S32G/S32R glue driver</title><updated>2024-11-01T15:41:02Z</updated><link
         1368 href="http://lore.kernel.org/lkml/9e876379-c555-45e6-8a8a-752d90fdc8ed@kernel.org/"/><id>urn:uuid:30c4433f-89b6-f3b7-80b7-9c9eeb95f8aa</id><thr:in-reply-to
         1369 ref="urn:uuid:fbcfeeed-2e04-e19b-b7e8-7edb91c7374e"
         1370 href="http://lore.kernel.org/lkml/ZyO9Mfq+znZdJJrJ@lsv051416.swis.nl-cdc01.nxp.com/"/><content
         1371 type="xhtml"><div
         1372 xmlns="http://www.w3.org/1999/xhtml"><pre
         1373 style="white-space:pre-wrap">On 31/10/2024 18:24, Jan Petrous wrote:
         1374 <span
         1375 class="q">&gt; On Thu, Oct 31, 2024 at 06:16:46PM +0100, Jan Petrous wrote:
         1376 &gt;&gt; On Thu, Oct 31, 2024 at 04:44:45PM +0100, Krzysztof Kozlowski wrote:
         1377 &gt;&gt;&gt; On 31/10/2024 15:43, Jan Petrous wrote:
         1378 &gt;&gt;&gt;&gt; On Tue, Oct 29, 2024 at 08:13:40AM +0100, Krzysztof Kozlowski wrote:
         1379 &gt;&gt;&gt;&gt;&gt; On Mon, Oct 28, 2024 at 09:24:56PM +0100, Jan Petrous (OSS) wrote:
         1380 &gt;&gt;&gt;&gt;&gt;&gt; +        plat-&gt;init = s32_gmac_init;
         1381 &gt;&gt;&gt;&gt;&gt;&gt; +        plat-&gt;exit = s32_gmac_exit;
         1382 &gt;&gt;&gt;&gt;&gt;&gt; +        plat-&gt;fix_mac_speed = s32_fix_mac_speed;
         1383 &gt;&gt;&gt;&gt;&gt;&gt; +
         1384 &gt;&gt;&gt;&gt;&gt;&gt; +        plat-&gt;bsp_priv = gmac;
         1385 &gt;&gt;&gt;&gt;&gt;&gt; +
         1386 &gt;&gt;&gt;&gt;&gt;&gt; +        return stmmac_pltfr_probe(pdev, plat, &#38;res);
         1387 &gt;&gt;&gt;&gt;&gt;&gt; +}
         1388 &gt;&gt;&gt;&gt;&gt;&gt; +
         1389 &gt;&gt;&gt;&gt;&gt;&gt; +static const struct of_device_id s32_dwmac_match[] = {
         1390 &gt;&gt;&gt;&gt;&gt;&gt; +        { .compatible = &#34;nxp,s32g2-dwmac&#34; },
         1391 &gt;&gt;&gt;&gt;&gt;&gt; +        { .compatible = &#34;nxp,s32g3-dwmac&#34; },
         1392 &gt;&gt;&gt;&gt;&gt;&gt; +        { .compatible = &#34;nxp,s32r-dwmac&#34; },
         1393 &gt;&gt;&gt;&gt;&gt;
         1394 &gt;&gt;&gt;&gt;&gt; Why do you need three same entries?
         1395 &gt;&gt;&gt;&gt;&gt;
         1396 &gt;&gt;&gt;&gt;
         1397 &gt;&gt;&gt;&gt; We have three different SoCs and in v3 review you told me
         1398 &gt;&gt;&gt;&gt; to return all back:
         1399 &gt;&gt;&gt;&gt; <a
         1400 href="https://patchwork.kernel.org/comment/26067257/">https://patchwork.kernel.org/comment/26067257/</a>
         1401 &gt;&gt;&gt;
         1402 &gt;&gt;&gt; It was about binding, not driver.
         1403 &gt;&gt;&gt;
         1404 &gt;&gt;&gt; I also asked there: use proper fallback and compatibility. Both comments
         1405 &gt;&gt;&gt; of course affect your driver, but why choosing only first part?
         1406 &gt;&gt;&gt;
         1407 &gt;&gt;
         1408 &gt;&gt; Does it mean I should remove first two (G2/G3) members from match array
         1409 &gt;&gt; and use &#34;nxp,s32r-dwmac&#34; as fallback for G2/G3? And similarly change
         1410 &gt;&gt; the bindings to:
         1411 &gt;&gt;
         1412 &gt;&gt;   compatible:
         1413 &gt;&gt;     oneOf:
         1414 &gt;&gt;       - const: nxp,s32r-dwmac
         1415 &gt;&gt;       - items:
         1416 &gt;&gt;           - enum:
         1417 &gt;&gt;               - nxp,s32g2-dwmac
         1418 &gt;&gt;               - nxp,s32g3-dwmac
         1419 &gt;&gt;           - const: nxp,s32r-dwmac
         1420 &gt;&gt;
         1421 &gt;&gt; And add here, into the driver, those members back when some device
         1422 &gt;&gt; specific feature will be needed? Am I understand your hints right?
         1423 &gt;&gt;
         1424 &gt; 
         1425 &gt; Sorry, it&#39;s not correct. This way I&#39;m not able to detect S32R which is
         1426 &gt; the only one with higher speed.
         1427 &gt; 
         1428 &gt; Then I could use the G2 as fallback I think, Ie.:
         1429 &gt; 
         1430 &gt;   compatible:
         1431 &gt;     oneOf:
         1432 &gt;       - const: nxp,s32g2-dwmac
         1433 &gt;       - items:
         1434 &gt;           - enum:
         1435 &gt;               - nxp,s32g3-dwmac
         1436 &gt;               - nxp,s32r-dwmac
         1437 &gt;            - const: nxp,s32g2-dwmac
         1438 </span>
         1439 I don&#39;t understand. In both cases you can &#39;detect r&#39;, if by this you
         1440 meant match and bind. I don&#39;t care which one is the fallback, but if one
         1441 does not work it points to different issues with your code.
         1442 
         1443 Best regards,
         1444 Krzysztof
         1445 
         1446 </pre></div></content></entry><entry><author><name>Bjorn Andersson</name><email>andersson@kernel.org</email></author><title>Re: [PATCH v3 3/3] PCI: qcom: Update ICC and OPP values during link up event</title><updated>2024-11-01T15:40:58Z</updated><link
         1447 href="http://lore.kernel.org/lkml/bsxaq6zilwaavcwi25dbz2wgrgqrqxfme6a5lfdg6jqfl4kspj@xahygne3tqg4/"/><id>urn:uuid:c1a51ad4-30df-8454-421f-cfa43c8a4dd0</id><thr:in-reply-to
         1448 ref="urn:uuid:60c26f9c-0686-e5b4-b0fd-213e2ead902f"
         1449 href="http://lore.kernel.org/lkml/20241101-remove_wait-v3-3-7accf27f7202@quicinc.com/"/><content
         1450 type="xhtml"><div
         1451 xmlns="http://www.w3.org/1999/xhtml"><pre
         1452 style="white-space:pre-wrap">On Fri, Nov 01, 2024 at 05:04:14PM GMT, Krishna chaitanya chundru wrote:
         1453 <span
         1454 class="q">&gt; As part of the PCIe link up event, update ICC and OPP values
         1455 &gt; as at this point only driver can know the link speed and
         1456 &gt; width of the PCIe link.
         1457 &gt; 
         1458 </span>
         1459 It would be nice if you were to write your commit messages in the style
         1460 documented at <a
         1461 href="https://docs.kernel.org/process/submitting-patches.html#describe-your-changes">https://docs.kernel.org/process/submitting-patches.html#describe-your-changes</a>
         1462 I.e. start with a clear problem description, then move into describing
         1463 the solution.
         1464 
         1465 Your commit message is stating that this is the only place the driver
         1466 can know the link speed, but wouldn&#39;t that imply that there&#39;s some
         1467 actual problem with the code currently?
         1468 
         1469 
         1470 I&#39;m guessing (because that&#39;s what your commit message is forcing me to
         1471 do) that in the case that we don&#39;t detect anything connected at probe
         1472 time and then we get a &#34;hotplug&#34; interrupt, we will have completely
         1473 incorrect bus votes?
         1474 
         1475 If so, it would seem that this patch should have a:
         1476 Fixes: 4581403f6792 (&#34;PCI: qcom: Enumerate endpoints based on Link up event in &#39;global_irq&#39; interrupt&#34;)
         1477 
         1478 And of course, a proper description of that problem.
         1479 
         1480 Regards,
         1481 Bjorn
         1482 
         1483 <span
         1484 class="q">&gt; Signed-off-by: Krishna chaitanya chundru &lt;quic_krichai@quicinc.com&gt;
         1485 &gt; ---
         1486 &gt;  drivers/pci/controller/dwc/pcie-qcom.c | 2 ++
         1487 &gt;  1 file changed, 2 insertions(+)
         1488 &gt; 
         1489 &gt; diff --git a/drivers/pci/controller/dwc/pcie-qcom.c b/drivers/pci/controller/dwc/pcie-qcom.c
         1490 &gt; index 474b7525442d..5826c0e7ca0b 100644
         1491 &gt; --- a/drivers/pci/controller/dwc/pcie-qcom.c
         1492 &gt; +++ b/drivers/pci/controller/dwc/pcie-qcom.c
         1493 &gt; @@ -1558,6 +1558,8 @@ static irqreturn_t qcom_pcie_global_irq_thread(int irq, void *data)
         1494 &gt;                  pci_lock_rescan_remove();
         1495 &gt;                  pci_rescan_bus(pp-&gt;bridge-&gt;bus);
         1496 &gt;                  pci_unlock_rescan_remove();
         1497 &gt; +
         1498 &gt; +                qcom_pcie_icc_opp_update(pcie);
         1499 &gt;          } else {
         1500 &gt;                  dev_WARN_ONCE(dev, 1, &#34;Received unknown event. INT_STATUS: 0x%08x\n&#34;,
         1501 &gt;                                status);
         1502 &gt; 
         1503 &gt; -- 
         1504 &gt; 2.34.1
         1505 &gt; 
         1506 &gt; 
         1507 </span></pre></div></content></entry><entry><author><name>Krzysztof Kozlowski</name><email>krzk@kernel.org</email></author><title>Re: [PATCH asahi-soc/dt 01/10] dt-bindings: arm: apple: apple,pmgr: Add A7-A11 compatibles</title><updated>2024-11-01T15:39:39Z</updated><link
         1508 href="http://lore.kernel.org/lkml/4ce01e3b-9bcd-4d8c-bfe1-c2b17a4c2566@kernel.org/"/><id>urn:uuid:0326f435-109d-72bc-0241-95f810e4c4e3</id><thr:in-reply-to
         1509 ref="urn:uuid:7100b345-9ca2-8988-dd45-907cd539adb4"
         1510 href="http://lore.kernel.org/lkml/5e0b5238-d781-458a-9285-df54a16232af@marcan.st/"/><content
         1511 type="xhtml"><div
         1512 xmlns="http://www.w3.org/1999/xhtml"><pre
         1513 style="white-space:pre-wrap">On 01/11/2024 13:33, Hector Martin wrote:
         1514 <span
         1515 class="q">&gt; - First the ancient s5l series
         1516 &gt; - Then all the t/sXXXX chips up to t8103 (M1) (numeric order, ignoring
         1517 &gt; prefix letter)
         1518 &gt; - Then the rest of the &#34;baseline&#34; Ax,Mx chips that continue after M1,
         1519 &gt; which are all numbered t8xxx (numeric order)
         1520 &gt; - Finally the t6xxx series (Mx Pro/Mx Max), which forks the timeline and
         1521 &gt; numbering after t8103/M1 (M1 Pro = t6000).
         1522 &gt; 
         1523 &gt; Unless there&#39;s significant objection I&#39;d like to keep this pattern, it
         1524 &gt; makes sense from the POV of people working on these chips.
         1525 </span>
         1526 No, no, it&#39;s fine, I am just forgetting where do we have exceptions. :)
         1527 
         1528 Best regards,
         1529 Krzysztof
         1530 
         1531 </pre></div></content></entry><entry><author><name>Oliver Upton</name><email>oliver.upton@linux.dev</email></author><title>Re: [PATCH v3 03/14] KVM: selftests: Return a value from vcpu_get_reg() instead of using an out-param</title><updated>2024-11-01T15:38:59Z</updated><link
         1532 href="http://lore.kernel.org/lkml/ZyT2CB6zodtbWEI9@linux.dev/"/><id>urn:uuid:8e0284c3-77ef-8e37-aab3-cf5125f83ce8</id><thr:in-reply-to
         1533 ref="urn:uuid:eaa12fb4-732a-6676-4b84-22d6654838f7"
         1534 href="http://lore.kernel.org/lkml/ZyTpwwm0s89iU9Pk@google.com/"/><content
         1535 type="xhtml"><div
         1536 xmlns="http://www.w3.org/1999/xhtml"><pre
         1537 style="white-space:pre-wrap">Hey,
         1538 
         1539 On Fri, Nov 01, 2024 at 07:48:00AM -0700, Sean Christopherson wrote:
         1540 <span
         1541 class="q">&gt; On Fri, Nov 01, 2024, Mark Brown wrote:
         1542 &gt; &gt; On Wed, Oct 09, 2024 at 08:49:42AM -0700, Sean Christopherson wrote:
         1543 &gt; &gt; &gt; Return a uint64_t from vcpu_get_reg() instead of having the caller provide
         1544 &gt; &gt; &gt; a pointer to storage, as none of the vcpu_get_reg() usage in KVM selftests
         1545 &gt; &gt; &gt; accesses a register larger than 64 bits, and vcpu_set_reg() only accepts a
         1546 &gt; &gt; &gt; 64-bit value.  If a use case comes along that needs to get a register that
         1547 &gt; &gt; &gt; is larger than 64 bits, then a utility can be added to assert success and
         1548 &gt; &gt; &gt; take a void pointer, but until then, forcing an out param yields ugly code
         1549 &gt; &gt; &gt; and prevents feeding the output of vcpu_get_reg() into vcpu_set_reg().
         1550 &gt; &gt; 
         1551 &gt; &gt; This commit, which is in today&#39;s -next as 5c6c7b71a45c9c, breaks the
         1552 &gt; &gt; build on arm64:
         1553 &gt; &gt; 
         1554 &gt; &gt; aarch64/psci_test.c: In function &#8216;host_test_system_off2&#8217;:
         1555 &gt; &gt; aarch64/psci_test.c:247:9: error: too many arguments to function &#8216;vcpu_get_reg&#8217;
         1556 &gt; &gt;   247 |         vcpu_get_reg(target, KVM_REG_ARM_PSCI_VERSION, &#38;psci_version);
         1557 &gt; &gt;       |         ^~~~~~~~~~~~
         1558 &gt; &gt; In file included from aarch64/psci_test.c:18:
         1559 &gt; &gt; include/kvm_util.h:705:24: note: declared here
         1560 &gt; &gt;   705 | static inline uint64_t vcpu_get_reg(struct kvm_vcpu *vcpu, uint64_t id)
         1561 &gt; &gt;       |                        ^~~~~~~~~~~~
         1562 &gt; &gt; At top level:
         1563 &gt; &gt; cc1: note: unrecognized command-line option &#8216;-Wno-gnu-variable-sized-type-not-at
         1564 &gt; &gt; -end&#8217; may have been intended to silence earlier diagnostics
         1565 &gt; &gt; 
         1566 &gt; &gt; since the updates done to that file did not take account of 72be5aa6be4
         1567 &gt; &gt; (&#34;KVM: selftests: Add test for PSCI SYSTEM_OFF2&#34;) which has been merged
         1568 &gt; &gt; in the kvm-arm64 tree.
         1569 &gt; 
         1570 &gt; Bugger.  In hindsight, it&#39;s obvious that of course arch selftests would add usage
         1571 &gt; of vcpu_get_reg().
         1572 &gt; 
         1573 &gt; Unless someone has a better idea, I&#39;ll drop the series from kvm-x86, post a new
         1574 &gt; version that applies on linux-next, and then re-apply the series just before the
         1575 &gt; v6.13 merge window (rinse and repeat as needed if more vcpu_get_reg() users come
         1576 &gt; along).
         1577 </span>
         1578 Can you instead just push out a topic branch and let the affected
         1579 maintainers deal with it? This is the usual way we handle conflicts
         1580 between trees...
         1581 
         1582 <span
         1583 class="q">&gt; That would be a good oppurtunity to do the $(ARCH) directory switch[*] too, e.g.
         1584 &gt; have a &#34;selftests_late&#34; or whatever topic branch.
         1585 </span>
         1586 The right time to do KVM-wide changes (even selftests) is *early* in the
         1587 development cycle, not last minute. It gives us plenty of time to iron out
         1588 the wrinkles.
         1589 
         1590 <span
         1591 class="q">&gt; Sorry for the pain Mark, you&#39;ve been playing janitor for us too much lately.
         1592 </span>
         1593 +1, appreciate your help on this.
         1594 
         1595 -- 
         1596 Thanks,
         1597 Oliver
         1598 </pre></div></content></entry><entry><author><name>Jonathan Cameron</name><email>jic23@kernel.org</email></author><title>Re: [PATCH v2 05/15] iio: proximity: sx9500: simplify code in write_event_config callback</title><updated>2024-11-01T15:37:09Z</updated><link
         1599 href="http://lore.kernel.org/lkml/20241101153656.43e27240@jic23-huawei/"/><id>urn:uuid:c655d237-138d-92db-3a39-fc0924f674ea</id><thr:in-reply-to
         1600 ref="urn:uuid:da253a47-1fe4-d6ec-5897-5cfcd6c7fd9f"
         1601 href="http://lore.kernel.org/lkml/20241031-iio-fix-write-event-config-signature-v2-5-2bcacbb517a2@baylibre.com/"/><content
         1602 type="xhtml"><div
         1603 xmlns="http://www.w3.org/1999/xhtml"><pre
         1604 style="white-space:pre-wrap">On Thu, 31 Oct 2024 16:27:00 +0100
         1605 Julien Stephan &lt;jstephan@baylibre.com&gt; wrote:
         1606 
         1607 <span
         1608 class="q">&gt; iio_ev_state_store is actually using kstrtobool to check user
         1609 &gt; input, then gives the converted boolean value to the write_event_config
         1610 &gt; callback.
         1611 &gt; 
         1612 &gt; Remove useless code in write_event_config callback.
         1613 &gt; 
         1614 &gt; Signed-off-by: Julien Stephan &lt;jstephan@baylibre.com&gt;
         1615 </span>Applied and pushed out as testing. Still time for other reviews if anyone
         1616 cares to take a look.
         1617 
         1618 Thanks,
         1619 
         1620 Jonathan
         1621 
         1622 <span
         1623 class="q">&gt; ---
         1624 &gt;  drivers/iio/proximity/sx9500.c | 4 ++--
         1625 &gt;  1 file changed, 2 insertions(+), 2 deletions(-)
         1626 &gt; 
         1627 &gt; diff --git a/drivers/iio/proximity/sx9500.c b/drivers/iio/proximity/sx9500.c
         1628 &gt; index 3f4eace05cfc6a4679fe82854dc059aa4a710d6d..e3da709424d5b2bd4e746df7adc4a4969e62f2a6 100644
         1629 &gt; --- a/drivers/iio/proximity/sx9500.c
         1630 &gt; +++ b/drivers/iio/proximity/sx9500.c
         1631 &gt; @@ -551,7 +551,7 @@ static int sx9500_write_event_config(struct iio_dev *indio_dev,
         1632 &gt;  
         1633 &gt;          mutex_lock(&#38;data-&gt;mutex);
         1634 &gt;  
         1635 &gt; -        if (state == 1) {
         1636 &gt; +        if (state) {
         1637 &gt;                  ret = sx9500_inc_chan_users(data, chan-&gt;channel);
         1638 &gt;                  if (ret &lt; 0)
         1639 &gt;                          goto out_unlock;
         1640 &gt; @@ -571,7 +571,7 @@ static int sx9500_write_event_config(struct iio_dev *indio_dev,
         1641 &gt;          goto out_unlock;
         1642 &gt;  
         1643 &gt;  out_undo_chan:
         1644 &gt; -        if (state == 1)
         1645 &gt; +        if (state)
         1646 &gt;                  sx9500_dec_chan_users(data, chan-&gt;channel);
         1647 &gt;          else
         1648 &gt;                  sx9500_inc_chan_users(data, chan-&gt;channel);
         1649 &gt; 
         1650 </span>
         1651 </pre></div></content></entry><entry><author><name>Kevin Hilman</name><email>khilman@baylibre.com</email></author><title>[PATCH v5 3/3] pmdomain: ti_sci: handle wake IRQs for IO daisy chain wakeups</title><updated>2024-11-01T15:36:48Z</updated><link
         1652 href="http://lore.kernel.org/lkml/20241101-lpm-v6-10-constraints-pmdomain-v5-3-3011aa04622f@baylibre.com/"/><id>urn:uuid:11615bf4-8ff2-c4a8-144c-ff8bb03cdf31</id><thr:in-reply-to
         1653 ref="urn:uuid:4b4b1161-c4f3-5b7a-f4fd-b9a8d5e4d864"
         1654 href="http://lore.kernel.org/lkml/20241101-lpm-v6-10-constraints-pmdomain-v5-0-3011aa04622f@baylibre.com/"/><content
         1655 type="xhtml"><div
         1656 xmlns="http://www.w3.org/1999/xhtml"><pre
         1657 style="white-space:pre-wrap">When a device supports IO daisy-chain wakeups, it uses a dedicated
         1658 wake IRQ.  Devices with IO daisy-chain wakeups enabled should not set
         1659 wakeup constraints since these can happen even from deep power states,
         1660 so should not prevent the DM from picking deep power states.
         1661 
         1662 Wake IRQs are set with dev_pm_set_wake_irq() or
         1663 dev_pm_set_dedicated_wake_irq().  The latter is used by the serial
         1664 driver used on K3 platforms (drivers/tty/serial/8250/8250_omap.c)
         1665 when the interrupts-extended property is used to describe the
         1666 dedicated wakeup interrupt.
         1667 
         1668 Detect these wake IRQs in the suspend path, and if set, skip sending
         1669 constraint.
         1670 
         1671 Tested-by: Dhruva Gole &lt;d-gole@ti.com&gt;
         1672 Signed-off-by: Kevin Hilman &lt;khilman@baylibre.com&gt;
         1673 ---
         1674  drivers/pmdomain/ti/ti_sci_pm_domains.c | 9 +++++++++
         1675  1 file <a href="http://lore.kernel.org/lkml/20241101-lpm-v6-10-constraints-pmdomain-v5-3-3011aa04622f@baylibre.com/#related">changed</a>, 9 insertions(+)
         1676 
         1677 <span
         1678 class="head">diff --git a/drivers/pmdomain/ti/ti_sci_pm_domains.c b/drivers/pmdomain/ti/ti_sci_pm_domains.c
         1679 index ff529fa2d6135cc2fb32ae8a3ca26ac055f66cf5..8c46ca428f60b3d42a5a43488538f16b7ffaa3ac 100644
         1680 --- a/drivers/pmdomain/ti/ti_sci_pm_domains.c
         1681 +++ b/drivers/pmdomain/ti/ti_sci_pm_domains.c
         1682 </span><span
         1683 class="hunk">@@ -82,6 +82,15 @@ static inline void ti_sci_pd_set_wkup_constraint(struct device *dev)
         1684 </span>         int ret;
         1685  
         1686          if (device_may_wakeup(dev)) {
         1687 <span
         1688 class="add">+                /*
         1689 +                 * If device can wakeup using IO daisy chain wakeups,
         1690 +                 * we do not want to set a constraint.
         1691 +                 */
         1692 +                if (dev-&gt;power.wakeirq) {
         1693 +                        dev_dbg(dev, &#34;%s: has wake IRQ, not setting constraints\n&#34;, __func__);
         1694 +                        return;
         1695 +                }
         1696 +
         1697 </span>                 ret = ti_sci-&gt;ops.pm_ops.set_device_constraint(ti_sci, pd-&gt;idx,
         1698                                                                 TISCI_MSG_CONSTRAINT_SET);
         1699                  if (!ret)
         1700 
         1701 -- 
         1702 2.46.2
         1703 
         1704 </pre></div></content></entry><entry><author><name>Kevin Hilman</name><email>khilman@baylibre.com</email></author><title>[PATCH v5 2/3] pmdomain: ti_sci: add wakeup constraint management</title><updated>2024-11-01T15:36:47Z</updated><link
         1705 href="http://lore.kernel.org/lkml/20241101-lpm-v6-10-constraints-pmdomain-v5-2-3011aa04622f@baylibre.com/"/><id>urn:uuid:48eb97d7-ab67-98c3-64b3-b03b2a84f61b</id><thr:in-reply-to
         1706 ref="urn:uuid:4b4b1161-c4f3-5b7a-f4fd-b9a8d5e4d864"
         1707 href="http://lore.kernel.org/lkml/20241101-lpm-v6-10-constraints-pmdomain-v5-0-3011aa04622f@baylibre.com/"/><content
         1708 type="xhtml"><div
         1709 xmlns="http://www.w3.org/1999/xhtml"><pre
         1710 style="white-space:pre-wrap">During system-wide suspend, check all devices connected to PM domain
         1711 to see if they are wakeup-enabled.  If so, set a TI SCI device
         1712 constraint.
         1713 
         1714 Note: DM firmware clears all constraints on resume.
         1715 
         1716 Co-developed-by: Vibhore Vardhan &lt;vibhore@ti.com&gt;
         1717 Signed-off-by: Vibhore Vardhan &lt;vibhore@ti.com&gt;
         1718 Reviewed-by: Ulf Hansson &lt;ulf.hansson@linaro.org&gt;
         1719 Tested-by: Dhruva Gole &lt;d-gole@ti.com&gt;
         1720 Signed-off-by: Kevin Hilman &lt;khilman@baylibre.com&gt;
         1721 ---
         1722  drivers/pmdomain/ti/ti_sci_pm_domains.c | 17 +++++++++++++++++
         1723  1 file <a href="http://lore.kernel.org/lkml/20241101-lpm-v6-10-constraints-pmdomain-v5-2-3011aa04622f@baylibre.com/#related">changed</a>, 17 insertions(+)
         1724 
         1725 <span
         1726 class="head">diff --git a/drivers/pmdomain/ti/ti_sci_pm_domains.c b/drivers/pmdomain/ti/ti_sci_pm_domains.c
         1727 index c976a382d64c807daea72fa1ea9d6c11c8773762..ff529fa2d6135cc2fb32ae8a3ca26ac055f66cf5 100644
         1728 --- a/drivers/pmdomain/ti/ti_sci_pm_domains.c
         1729 +++ b/drivers/pmdomain/ti/ti_sci_pm_domains.c
         1730 </span><span
         1731 class="hunk">@@ -74,6 +74,21 @@ static void ti_sci_pd_set_lat_constraint(struct device *dev, s32 val)
         1732 </span>                         pd-&gt;idx, val);
         1733  }
         1734  
         1735 <span
         1736 class="add">+static inline void ti_sci_pd_set_wkup_constraint(struct device *dev)
         1737 +{
         1738 +        struct generic_pm_domain *genpd = pd_to_genpd(dev-&gt;pm_domain);
         1739 +        struct ti_sci_pm_domain *pd = genpd_to_ti_sci_pd(genpd);
         1740 +        const struct ti_sci_handle *ti_sci = pd-&gt;parent-&gt;ti_sci;
         1741 +        int ret;
         1742 +
         1743 +        if (device_may_wakeup(dev)) {
         1744 +                ret = ti_sci-&gt;ops.pm_ops.set_device_constraint(ti_sci, pd-&gt;idx,
         1745 +                                                               TISCI_MSG_CONSTRAINT_SET);
         1746 +                if (!ret)
         1747 +                        dev_dbg(dev, &#34;ti_sci_pd: ID:%d set device constraint.\n&#34;, pd-&gt;idx);
         1748 +        }
         1749 +}
         1750 +
         1751 </span> /*
         1752   * ti_sci_pd_power_off(): genpd power down hook
         1753   * @domain: pointer to the powerdomain to power off
         1754 <span
         1755 class="hunk">@@ -116,6 +131,8 @@ static int ti_sci_pd_suspend(struct device *dev)
         1756 </span>         if (ti_sci_pd_is_valid_constraint(val))
         1757                  ti_sci_pd_set_lat_constraint(dev, val);
         1758  
         1759 <span
         1760 class="add">+        ti_sci_pd_set_wkup_constraint(dev);
         1761 +
         1762 </span>         return 0;
         1763  }
         1764  #else
         1765 
         1766 -- 
         1767 2.46.2
         1768 
         1769 </pre></div></content></entry><entry><author><name>Kevin Hilman</name><email>khilman@baylibre.com</email></author><title>[PATCH v5 1/3] pmdomain: ti_sci: add per-device latency constraint management</title><updated>2024-11-01T15:36:47Z</updated><link
         1770 href="http://lore.kernel.org/lkml/20241101-lpm-v6-10-constraints-pmdomain-v5-1-3011aa04622f@baylibre.com/"/><id>urn:uuid:31e47c58-c301-6d44-2c84-1d34a06ae318</id><thr:in-reply-to
         1771 ref="urn:uuid:4b4b1161-c4f3-5b7a-f4fd-b9a8d5e4d864"
         1772 href="http://lore.kernel.org/lkml/20241101-lpm-v6-10-constraints-pmdomain-v5-0-3011aa04622f@baylibre.com/"/><content
         1773 type="xhtml"><div
         1774 xmlns="http://www.w3.org/1999/xhtml"><pre
         1775 style="white-space:pre-wrap">For each device in a TI SCI PM domain, check whether the device has
         1776 any resume latency constraints set via per-device PM QoS.  If
         1777 constraints are set, send them to DM via the new SCI constraints API.
         1778 
         1779 Checking for constraints happen for each device before system-wide
         1780 suspend (via -&gt;suspend() hook.)
         1781 
         1782 An important detail here is that the PM domain driver inserts itself
         1783 into the path of both the -&gt;suspend() and -&gt;resume() hook path
         1784 of *all* devices in the PM domain.  This allows generic PM domain code
         1785 to handle the constraint management and communication with TI SCI.
         1786 
         1787 Further, this allows device drivers to use existing PM QoS APIs to
         1788 add/update constraints.
         1789 
         1790 DM firmware clears constraints during its resume, so Linux has
         1791 to check/update/send constraints each time system suspends.
         1792 
         1793 Co-developed-by: Vibhore Vardhan &lt;vibhore@ti.com&gt;
         1794 Signed-off-by: Vibhore Vardhan &lt;vibhore@ti.com&gt;
         1795 Reviewed-by: Markus Schneider-Pargmann &lt;msp@baylibre.com&gt;
         1796 Reviewed-by: Ulf Hansson &lt;ulf.hansson@linaro.org&gt;
         1797 Tested-by: Dhruva Gole &lt;d-gole@ti.com&gt;
         1798 Signed-off-by: Kevin Hilman &lt;khilman@baylibre.com&gt;
         1799 ---
         1800  drivers/pmdomain/ti/ti_sci_pm_domains.c | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++
         1801  1 file <a href="http://lore.kernel.org/lkml/20241101-lpm-v6-10-constraints-pmdomain-v5-1-3011aa04622f@baylibre.com/#related">changed</a>, 50 insertions(+)
         1802 
         1803 <span
         1804 class="head">diff --git a/drivers/pmdomain/ti/ti_sci_pm_domains.c b/drivers/pmdomain/ti/ti_sci_pm_domains.c
         1805 index 1510d5ddae3decd5b70f835338ed4e0b2a3c9373..c976a382d64c807daea72fa1ea9d6c11c8773762 100644
         1806 --- a/drivers/pmdomain/ti/ti_sci_pm_domains.c
         1807 +++ b/drivers/pmdomain/ti/ti_sci_pm_domains.c
         1808 </span><span
         1809 class="hunk">@@ -13,6 +13,8 @@
         1810 </span> #include &lt;linux/platform_device.h&gt;
         1811  #include &lt;linux/pm_domain.h&gt;
         1812  #include &lt;linux/slab.h&gt;
         1813 <span
         1814 class="add">+#include &lt;linux/pm_qos.h&gt;
         1815 +#include &lt;linux/pm_runtime.h&gt;
         1816 </span> #include &lt;linux/soc/ti/ti_sci_protocol.h&gt;
         1817  #include &lt;dt-bindings/soc/ti,sci_pm_domain.h&gt;
         1818  
         1819 <span
         1820 class="hunk">@@ -51,6 +53,27 @@ struct ti_sci_pm_domain {
         1821 </span> 
         1822  #define genpd_to_ti_sci_pd(gpd) container_of(gpd, struct ti_sci_pm_domain, pd)
         1823  
         1824 <span
         1825 class="add">+static inline bool ti_sci_pd_is_valid_constraint(s32 val)
         1826 +{
         1827 +        return val != PM_QOS_RESUME_LATENCY_NO_CONSTRAINT;
         1828 +}
         1829 +
         1830 +static void ti_sci_pd_set_lat_constraint(struct device *dev, s32 val)
         1831 +{
         1832 +        struct generic_pm_domain *genpd = pd_to_genpd(dev-&gt;pm_domain);
         1833 +        struct ti_sci_pm_domain *pd = genpd_to_ti_sci_pd(genpd);
         1834 +        const struct ti_sci_handle *ti_sci = pd-&gt;parent-&gt;ti_sci;
         1835 +        int ret;
         1836 +
         1837 +        ret = ti_sci-&gt;ops.pm_ops.set_latency_constraint(ti_sci, val, TISCI_MSG_CONSTRAINT_SET);
         1838 +        if (ret)
         1839 +                dev_err(dev, &#34;ti_sci_pd: set latency constraint failed: ret=%d\n&#34;,
         1840 +                        ret);
         1841 +        else
         1842 +                dev_dbg(dev, &#34;ti_sci_pd: ID:%d set latency constraint %d\n&#34;,
         1843 +                        pd-&gt;idx, val);
         1844 +}
         1845 +
         1846 </span> /*
         1847   * ti_sci_pd_power_off(): genpd power down hook
         1848   * @domain: pointer to the powerdomain to power off
         1849 <span
         1850 class="hunk">@@ -79,6 +102,26 @@ static int ti_sci_pd_power_on(struct generic_pm_domain *domain)
         1851 </span>                 return ti_sci-&gt;ops.dev_ops.get_device(ti_sci, pd-&gt;idx);
         1852  }
         1853  
         1854 <span
         1855 class="add">+#ifdef CONFIG_PM_SLEEP
         1856 +static int ti_sci_pd_suspend(struct device *dev)
         1857 +{
         1858 +        int ret;
         1859 +        s32 val;
         1860 +
         1861 +        ret = pm_generic_suspend(dev);
         1862 +        if (ret)
         1863 +                return ret;
         1864 +
         1865 +        val = dev_pm_qos_read_value(dev, DEV_PM_QOS_RESUME_LATENCY);
         1866 +        if (ti_sci_pd_is_valid_constraint(val))
         1867 +                ti_sci_pd_set_lat_constraint(dev, val);
         1868 +
         1869 +        return 0;
         1870 +}
         1871 +#else
         1872 +#define ti_sci_pd_suspend                NULL
         1873 +#endif
         1874 +
         1875 </span> /*
         1876   * ti_sci_pd_xlate(): translation service for TI SCI genpds
         1877   * @genpdspec: DT identification data for the genpd
         1878 <span
         1879 class="hunk">@@ -188,6 +231,13 @@ static int ti_sci_pm_domain_probe(struct platform_device *pdev)
         1880 </span>                                 pd-&gt;pd.power_on = ti_sci_pd_power_on;
         1881                                  pd-&gt;idx = args.args[0];
         1882                                  pd-&gt;parent = pd_provider;
         1883 <span
         1884 class="add">+                                /*
         1885 +                                 * If SCI constraint functions are present, then firmware
         1886 +                                 * supports the constraints API.
         1887 +                                 */
         1888 +                                if (pd_provider-&gt;ti_sci-&gt;ops.pm_ops.set_device_constraint &#38;&#38;
         1889 +                                    pd_provider-&gt;ti_sci-&gt;ops.pm_ops.set_latency_constraint)
         1890 +                                        pd-&gt;pd.domain.ops.suspend = ti_sci_pd_suspend;
         1891 </span> 
         1892                                  pm_genpd_init(&#38;pd-&gt;pd, NULL, true);
         1893  
         1894 
         1895 -- 
         1896 2.46.2
         1897 
         1898 </pre></div></content></entry><entry><author><name>Kevin Hilman</name><email>khilman@baylibre.com</email></author><title>[PATCH v5 0/3] pmdomain: ti_sci: collect and send low-power mode constraints</title><updated>2024-11-01T15:36:46Z</updated><link
         1899 href="http://lore.kernel.org/lkml/20241101-lpm-v6-10-constraints-pmdomain-v5-0-3011aa04622f@baylibre.com/"/><id>urn:uuid:4b4b1161-c4f3-5b7a-f4fd-b9a8d5e4d864</id><content
         1900 type="xhtml"><div
         1901 xmlns="http://www.w3.org/1999/xhtml"><pre
         1902 style="white-space:pre-wrap">The latest (10.x) version of the firmware for the PM co-processor (aka
         1903 device manager, or DM) adds support for a &#34;managed&#34; mode, where the DM
         1904 firmware will select the specific low power state which is entered
         1905 when Linux requests a system-wide suspend.
         1906 
         1907 In this mode, the DM will always attempt the deepest low-power state
         1908 available for the SoC.
         1909 
         1910 However, Linux (or OSes running on other cores) may want to constrain
         1911 the DM for certain use cases.  For example, the deepest state may have
         1912 a wakeup/resume latency that is too long for certain use cases.  Or,
         1913 some wakeup-capable devices may potentially be powered off in deep
         1914 low-power states, but if one of those devices is enabled as a wakeup
         1915 source, it should not be powered off.
         1916 
         1917 These kinds of constraints are are already known in Linux by the use
         1918 of existing APIs such as per-device PM QoS and device wakeup APIs, but
         1919 now we need to communicate these constraints to the DM.
         1920 
         1921 For TI SoCs with TI SCI support, all DM-managed devices will be
         1922 connected to a TI SCI PM domain.  So the goal of this series is to use
         1923 the PM domain driver for TI SCI devices to collect constraints, and
         1924 communicate them to the DM via the new TI SCI APIs.
         1925 
         1926 This is all managed by TI SCI PM domain code.  No new APIs are needed
         1927 by Linux drivers.  Any device that is managed by TI SCI will be
         1928 checked for QoS constraints or wakeup capability and the constraints
         1929 will be collected and sent to the DM.
         1930 
         1931 This series depends on the support for the new TI SCI APIs (v10) and
         1932 was also tested with this series to update 8250_omap serial support
         1933 for AM62x[2].
         1934 
         1935 [1] <a
         1936 href="https://lore.kernel.org/all/20240801195422.2296347-1-msp@baylibre.com">https://lore.kernel.org/all/20240801195422.2296347-1-msp@baylibre.com</a>
         1937 [2] <a
         1938 href="https://lore.kernel.org/all/20240807141227.1093006-1-msp@baylibre.com/">https://lore.kernel.org/all/20240807141227.1093006-1-msp@baylibre.com/</a>
         1939 
         1940 Signed-off-by: Kevin Hilman &lt;khilman@baylibre.com&gt;
         1941 ---
         1942 Changes in v5:
         1943 - fix build-error when CONFIG_PM_SLEEP not defined
         1944 - Link to v4: <a
         1945 href="https://lore.kernel.org/r/20240906-lpm-v6-10-constraints-pmdomain-v4-0-4055557fafbc@baylibre.com">https://lore.kernel.org/r/20240906-lpm-v6-10-constraints-pmdomain-v4-0-4055557fafbc@baylibre.com</a>
         1946 
         1947 Changes in v4:
         1948 - fixed missing return in wakeirq error path
         1949 - updated trailers with reviewed &#38; tested tags
         1950 - Link to v3: <a
         1951 href="https://lore.kernel.org/r/20240905-lpm-v6-10-constraints-pmdomain-v3-0-e359cbb39654@baylibre.com">https://lore.kernel.org/r/20240905-lpm-v6-10-constraints-pmdomain-v3-0-e359cbb39654@baylibre.com</a>
         1952 
         1953 Changes in v3:
         1954 - change latency set functions to static void
         1955 - Link to v2: <a
         1956 href="https://lore.kernel.org/r/20240819-lpm-v6-10-constraints-pmdomain-v2-0-461325a6008f@baylibre.com">https://lore.kernel.org/r/20240819-lpm-v6-10-constraints-pmdomain-v2-0-461325a6008f@baylibre.com</a>
         1957 
         1958 Changes in v2:
         1959 - To simplify this version a bit, drop the pmdomain -&gt;power_off()
         1960   changes.  Constraints only sent during -&gt;suspend() path.  The pmdomain
         1961   path was an optimization that may be added back later.
         1962 - With the above simplification, drop the extra state variables that
         1963   had been added to keep track of constraint status.
         1964 - Link to v1: <a
         1965 href="https://lore.kernel.org/r/20240805-lpm-v6-10-constraints-pmdomain-v1-0-d186b68ded4c@baylibre.com">https://lore.kernel.org/r/20240805-lpm-v6-10-constraints-pmdomain-v1-0-d186b68ded4c@baylibre.com</a>
         1966 
         1967 ---
         1968 Kevin Hilman (3):
         1969       pmdomain: ti_sci: add per-device latency constraint management
         1970       pmdomain: ti_sci: add wakeup constraint management
         1971       pmdomain: ti_sci: handle wake IRQs for IO daisy chain wakeups
         1972 
         1973  drivers/pmdomain/ti/ti_sci_pm_domains.c | 76 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
         1974  1 file changed, 76 insertions(+)
         1975 ---
         1976 base-commit: ad7eb1b6b92ee0c959a0a6ae846ddadd7a79ea64
         1977 change-id: 20240802-lpm-v6-10-constraints-pmdomain-f33df5aef449
         1978 prerequisite-change-id: 20241006-tisci-syssuspendresume-e6550720a50f:v13
         1979 prerequisite-patch-id: 945b15416a011cb40007c5d95561786c1776bb98
         1980 prerequisite-patch-id: 69a741b9c81d7990937483fc481aafa70e67669d
         1981 prerequisite-patch-id: 15e97947da8cb7055745151990c756d81fded804
         1982 prerequisite-patch-id: a0efbf22e69d23dba8bb96db4032ca644935709b
         1983 prerequisite-patch-id: 2999da190c1ba63aabecc55fae501d442e4e0d7b
         1984 
         1985 Best regards,
         1986 -- 
         1987 Kevin Hilman &lt;khilman@baylibre.com&gt;
         1988 
         1989 </pre></div></content></entry><entry><author><name>Jonathan Cameron</name><email>jic23@kernel.org</email></author><title>Re: [PATCH v2 04/15] iio: proximity: irsd200: simplify code in write_event_config callback</title><updated>2024-11-01T15:36:20Z</updated><link
         1990 href="http://lore.kernel.org/lkml/20241101153608.23a9c6f1@jic23-huawei/"/><id>urn:uuid:74f09b13-8157-93a6-328b-90d18d2afd4b</id><thr:in-reply-to
         1991 ref="urn:uuid:447a8057-432d-a0a9-a141-fc5025a1a9a0"
         1992 href="http://lore.kernel.org/lkml/20241031-iio-fix-write-event-config-signature-v2-4-2bcacbb517a2@baylibre.com/"/><content
         1993 type="xhtml"><div
         1994 xmlns="http://www.w3.org/1999/xhtml"><pre
         1995 style="white-space:pre-wrap">On Thu, 31 Oct 2024 16:26:59 +0100
         1996 Julien Stephan &lt;jstephan@baylibre.com&gt; wrote:
         1997 
         1998 <span
         1999 class="q">&gt; iio_ev_state_store is actually using kstrtobool to check user
         2000 &gt; input, then gives the converted boolean value to the write_event_config
         2001 &gt; callback.
         2002 &gt; 
         2003 &gt; Remove useless code in write_event_config callback.
         2004 &gt; 
         2005 &gt; Signed-off-by: Julien Stephan &lt;jstephan@baylibre.com&gt;
         2006 </span>Applied and pushed out as testing.  If anyone has time to review
         2007 I can still add tags (or pull the patches if there is something I missed!)
         2008 
         2009 Thanks,
         2010 
         2011 Jonathan
         2012 
         2013 <span
         2014 class="q">&gt; ---
         2015 &gt;  drivers/iio/proximity/irsd200.c | 2 +-
         2016 &gt;  1 file changed, 1 insertion(+), 1 deletion(-)
         2017 &gt; 
         2018 &gt; diff --git a/drivers/iio/proximity/irsd200.c b/drivers/iio/proximity/irsd200.c
         2019 &gt; index 6e96b764fed8b577d71c3146210679b0b61d4c38..fb0691da99ee621e19013a64d122f097e793efd9 100644
         2020 &gt; --- a/drivers/iio/proximity/irsd200.c
         2021 &gt; +++ b/drivers/iio/proximity/irsd200.c
         2022 &gt; @@ -662,7 +662,7 @@ static int irsd200_write_event_config(struct iio_dev *indio_dev,
         2023 &gt;                          return ret;
         2024 &gt;  
         2025 &gt;                  return regmap_field_write(
         2026 &gt; -                        data-&gt;regfields[IRS_REGF_INTR_COUNT_THR_OR], !!state);
         2027 &gt; +                        data-&gt;regfields[IRS_REGF_INTR_COUNT_THR_OR], state);
         2028 &gt;          default:
         2029 &gt;                  return -EINVAL;
         2030 &gt;          }
         2031 &gt; 
         2032 </span>
         2033 </pre></div></content></entry><entry><author><name>Kevin Hilman</name><email>khilman@baylibre.com</email></author><title>Re: [PATCH v4 0/3] pmdomain: ti_sci: collect and send low-power mode constraints</title><updated>2024-11-01T15:35:30Z</updated><link
         2034 href="http://lore.kernel.org/lkml/7hwmhnnf0f.fsf@baylibre.com/"/><id>urn:uuid:c61ea5b1-48e8-c3d0-eac6-5fc9154ec730</id><thr:in-reply-to
         2035 ref="urn:uuid:cc2c9c2c-260b-f814-2876-26305aeca478"
         2036 href="http://lore.kernel.org/lkml/20241101144445.56ejnuoxshqwns37@boots/"/><content
         2037 type="xhtml"><div
         2038 xmlns="http://www.w3.org/1999/xhtml"><pre
         2039 style="white-space:pre-wrap">Nishanth Menon &lt;nm@ti.com&gt; writes:
         2040 
         2041 <span
         2042 class="q">&gt; On 11:11-20241031, Ulf Hansson wrote:
         2043 &gt;&gt; On Wed, 30 Oct 2024 at 20:43, Kevin Hilman &lt;khilman@baylibre.com&gt; wrote:
         2044 &gt;&gt; &gt;
         2045 &gt;&gt; &gt; Ulf Hansson &lt;ulf.hansson@linaro.org&gt; writes:
         2046 &gt;&gt; &gt;
         2047 &gt;&gt; &gt; &gt; On Wed, 30 Oct 2024 at 14:01, Nishanth Menon &lt;nm@ti.com&gt; wrote:
         2048 &gt;&gt; &gt; &gt;&gt;
         2049 &gt;&gt; &gt; &gt;&gt; Hi Kevin Hilman,
         2050 &gt;&gt; &gt; &gt;&gt;
         2051 &gt;&gt; &gt; &gt;&gt; On Fri, 06 Sep 2024 09:14:48 -0700, Kevin Hilman wrote:
         2052 &gt;&gt; &gt; &gt;&gt; &gt; The latest (10.x) version of the firmware for the PM co-processor (aka
         2053 &gt;&gt; &gt; &gt;&gt; &gt; device manager, or DM) adds support for a &#34;managed&#34; mode, where the DM
         2054 &gt;&gt; &gt; &gt;&gt; &gt; firmware will select the specific low power state which is entered
         2055 &gt;&gt; &gt; &gt;&gt; &gt; when Linux requests a system-wide suspend.
         2056 &gt;&gt; &gt; &gt;&gt; &gt;
         2057 &gt;&gt; &gt; &gt;&gt; &gt; In this mode, the DM will always attempt the deepest low-power state
         2058 &gt;&gt; &gt; &gt;&gt; &gt; available for the SoC.
         2059 &gt;&gt; &gt; &gt;&gt; &gt;
         2060 &gt;&gt; &gt; &gt;&gt; &gt; [...]
         2061 &gt;&gt; &gt; &gt;&gt;
         2062 &gt;&gt; &gt; &gt;&gt; I have applied the following to branch ti-drivers-soc-next on [1].
         2063 &gt;&gt; &gt; &gt;&gt; Thank you!
         2064 &gt;&gt; &gt; &gt;&gt;
         2065 &gt;&gt; &gt; &gt;&gt; Ulf, based on your ack[2], I have assumed that you want me to pick
         2066 &gt;&gt; &gt; &gt;&gt; this series up. Let me know if that is not the case and I can drop the
         2067 &gt;&gt; &gt; &gt;&gt; series.
         2068 &gt;&gt; &gt; &gt;
         2069 &gt;&gt; &gt; &gt; Well, that was a while ago. The reason was because there was a
         2070 &gt;&gt; &gt; &gt; dependency to another series [2], when this was posted.
         2071 &gt;&gt; &gt; &gt;
         2072 &gt;&gt; &gt; &gt; If that&#39;s not the case anymore, I think it&#39;s better to funnel this via
         2073 &gt;&gt; &gt; &gt; my pmdomain tree. Please let me know how to proceed.
         2074 &gt;&gt; &gt;
         2075 &gt;&gt; &gt; The build-time dependency on [2] still exists, and since that was just
         2076 &gt;&gt; &gt; queued up by Nishanth, I think this series should (still) go along with
         2077 &gt;&gt; &gt; it to keep things simple.
         2078 &gt;&gt; &gt;
         2079 &gt;&gt; &gt; Kevin
         2080 &gt;&gt; 
         2081 &gt;&gt; Right, that makes perfect sense to me too. If we discover conflicts,
         2082 &gt;&gt; let&#39;s deal with them then.
         2083 &gt;
         2084 &gt;
         2085 &gt; oops.. I missed this response. OK, I will let things be.
         2086 &gt;
         2087 </span>
         2088 Oops, 0day bot found a build error in linux-next when CONFIG_PM_SLEEP is
         2089 not defined[1].  Need to respin to fix this.
         2090 
         2091 v5 coming right up....
         2092 
         2093 Kevin
         2094 
         2095 [1] <a
         2096 href="https://lore.kernel.org/all/CA+G9fYtioQ22nVr9m22+qyMqUNRsGdA=cFw_j1OUv=x8Pcs-bw@mail.gmail.com/">https://lore.kernel.org/all/CA+G9fYtioQ22nVr9m22+qyMqUNRsGdA=cFw_j1OUv=x8Pcs-bw@mail.gmail.com/</a>
         2097 </pre></div></content></entry><entry><author><name>Jonathan Cameron</name><email>jic23@kernel.org</email></author><title>Re: [PATCH v2 03/15] iio: light: tsl2772: simplify code in write_event_config callback</title><updated>2024-11-01T15:35:21Z</updated><link
         2098 href="http://lore.kernel.org/lkml/20241101153509.11ae74b9@jic23-huawei/"/><id>urn:uuid:ba78cdbf-6561-c6ef-f0fd-10f343557c18</id><thr:in-reply-to
         2099 ref="urn:uuid:c9c12e36-c944-62c0-f373-d6c3c51e217e"
         2100 href="http://lore.kernel.org/lkml/20241031-iio-fix-write-event-config-signature-v2-3-2bcacbb517a2@baylibre.com/"/><content
         2101 type="xhtml"><div
         2102 xmlns="http://www.w3.org/1999/xhtml"><pre
         2103 style="white-space:pre-wrap">On Thu, 31 Oct 2024 16:26:58 +0100
         2104 Julien Stephan &lt;jstephan@baylibre.com&gt; wrote:
         2105 
         2106 <span
         2107 class="q">&gt; iio_ev_state_store is actually using kstrtobool to check user
         2108 &gt; input, then gives the converted boolean value to the write_event_config
         2109 &gt; callback.
         2110 &gt; 
         2111 &gt; Remove useless code in write_event_config callback.
         2112 &gt; 
         2113 &gt; Signed-off-by: Julien Stephan &lt;jstephan@baylibre.com&gt;
         2114 </span>Applied.
         2115 <span
         2116 class="q">&gt; ---
         2117 &gt;  drivers/iio/light/tsl2772.c | 4 ++--
         2118 &gt;  1 file changed, 2 insertions(+), 2 deletions(-)
         2119 &gt; 
         2120 &gt; diff --git a/drivers/iio/light/tsl2772.c b/drivers/iio/light/tsl2772.c
         2121 &gt; index cab468a82b616a23394977da1d8822d29d8941d3..26082f239c4c3aeabfe73ed100d6e885f5266329 100644
         2122 &gt; --- a/drivers/iio/light/tsl2772.c
         2123 &gt; +++ b/drivers/iio/light/tsl2772.c
         2124 &gt; @@ -1086,9 +1086,9 @@ static int tsl2772_write_interrupt_config(struct iio_dev *indio_dev,
         2125 &gt;          struct tsl2772_chip *chip = iio_priv(indio_dev);
         2126 &gt;  
         2127 &gt;          if (chan-&gt;type == IIO_INTENSITY)
         2128 &gt; -                chip-&gt;settings.als_interrupt_en = val ? true : false;
         2129 &gt; +                chip-&gt;settings.als_interrupt_en = val;
         2130 &gt;          else
         2131 &gt; -                chip-&gt;settings.prox_interrupt_en = val ? true : false;
         2132 &gt; +                chip-&gt;settings.prox_interrupt_en = val;
         2133 &gt;  
         2134 &gt;          return tsl2772_invoke_change(indio_dev);
         2135 &gt;  }
         2136 &gt; 
         2137 </span>
         2138 </pre></div></content></entry><entry><author><name>Jonathan Cameron</name><email>jic23@kernel.org</email></author><title>Re: [PATCH v2 02/15] iio: proximity: hx9023s: simplify code in write_event_config callback</title><updated>2024-11-01T15:34:46Z</updated><link
         2139 href="http://lore.kernel.org/lkml/20241101153434.11d85f8b@jic23-huawei/"/><id>urn:uuid:c8a9619e-10eb-3a16-1f56-21cbfa9dc5e5</id><thr:in-reply-to
         2140 ref="urn:uuid:86f1d001-2b45-a3aa-44a1-1b4b99f208db"
         2141 href="http://lore.kernel.org/lkml/20241031-iio-fix-write-event-config-signature-v2-2-2bcacbb517a2@baylibre.com/"/><content
         2142 type="xhtml"><div
         2143 xmlns="http://www.w3.org/1999/xhtml"><pre
         2144 style="white-space:pre-wrap">On Thu, 31 Oct 2024 16:26:57 +0100
         2145 Julien Stephan &lt;jstephan@baylibre.com&gt; wrote:
         2146 
         2147 <span
         2148 class="q">&gt; iio_ev_state_store is actually using kstrtobool to check user
         2149 &gt; input, then gives the converted boolean value to the write_event_config
         2150 &gt; callback.
         2151 &gt; 
         2152 &gt; Remove useless code in write_event_config callback.
         2153 &gt; 
         2154 &gt; Signed-off-by: Julien Stephan &lt;jstephan@baylibre.com&gt;
         2155 </span>Applied to the togreg branch of iio.git and pushed out as testing.
         2156 Note if anyone else has time to review, I can still add tags for now.
         2157 
         2158 I&#39;ll probably push it out as an (in theory) not rebasing tree early
         2159 next week to give a bit of time in next before a pull request.
         2160 
         2161 Jonathan
         2162 
         2163 <span
         2164 class="q">&gt; ---
         2165 &gt;  drivers/iio/proximity/hx9023s.c | 2 +-
         2166 &gt;  1 file changed, 1 insertion(+), 1 deletion(-)
         2167 &gt; 
         2168 &gt; diff --git a/drivers/iio/proximity/hx9023s.c b/drivers/iio/proximity/hx9023s.c
         2169 &gt; index d8fb34060d3db88a3ba5ecdc209b14be8e42e8b9..38441b1ee040c7c26047b0cb2ac443ecb8396df3 100644
         2170 &gt; --- a/drivers/iio/proximity/hx9023s.c
         2171 &gt; +++ b/drivers/iio/proximity/hx9023s.c
         2172 &gt; @@ -879,7 +879,7 @@ static int hx9023s_write_event_config(struct iio_dev *indio_dev,
         2173 &gt;          struct hx9023s_data *data = iio_priv(indio_dev);
         2174 &gt;  
         2175 &gt;          if (test_bit(chan-&gt;channel, &#38;data-&gt;chan_in_use)) {
         2176 &gt; -                hx9023s_ch_en(data, chan-&gt;channel, !!state);
         2177 &gt; +                hx9023s_ch_en(data, chan-&gt;channel, state);
         2178 &gt;                  __assign_bit(chan-&gt;channel, &#38;data-&gt;chan_event,
         2179 &gt;                               data-&gt;ch_data[chan-&gt;channel].enable);
         2180 &gt;          }
         2181 &gt; 
         2182 </span>
         2183