mbox series

[dt-schema,0/3] schemas: i2c: fix "smbus_alert" handling

Message ID 20240815120935.5871-1-wsa+renesas@sang-engineering.com (mailing list archive)
Headers show
Series schemas: i2c: fix "smbus_alert" handling | expand

Message

Wolfram Sang Aug. 15, 2024, 12:09 p.m. UTC
"smbus_alert" is currently listed as an interrupt for targets. This is
wrong, it is an interrupt for the controller. The mistake (mea culpa!)
was already in the originating "i2c.txt" file in the Linux Kernel. Time
to fix it. Make small changes to descriptions to use inclusive language
while we are here.

Sadly, not tested with 'dt-doc-validate'. I tried to install my local
dtschema repo with

 $ ~/.venv/bin/pip3 install -e .

and got:

 error: Multiple top-level packages discovered in a flat-layout: ['patches', 'dtschema'].

I am afraid I am not enough of a Python guy to fix this on my own.

Looking forward to comments...


Wolfram Sang (3):
  schemas: i2c: reword descriptions for inclusive language
  schemas: i2c: clean up interrupt descriptions for I2C targets
  schemas: i2c: add generic interrupt name for I2C controllers

 dtschema/schemas/i2c/i2c-controller.yaml | 36 +++++++++++++++++-------
 1 file changed, 26 insertions(+), 10 deletions(-)

Comments

Rob Herring (Arm) Aug. 15, 2024, 2:46 p.m. UTC | #1
On Thu, Aug 15, 2024 at 6:09 AM Wolfram Sang
<wsa+renesas@sang-engineering.com> wrote:
>
> "smbus_alert" is currently listed as an interrupt for targets. This is
> wrong, it is an interrupt for the controller. The mistake (mea culpa!)
> was already in the originating "i2c.txt" file in the Linux Kernel. Time
> to fix it. Make small changes to descriptions to use inclusive language
> while we are here.
>
> Sadly, not tested with 'dt-doc-validate'. I tried to install my local
> dtschema repo with
>
>  $ ~/.venv/bin/pip3 install -e .
>
> and got:
>
>  error: Multiple top-level packages discovered in a flat-layout: ['patches', 'dtschema'].

Do you have a 'patches' directory? Not sure why that's a problem other
than python having specific ideas on directory structures.

Rob
Wolfram Sang Aug. 15, 2024, 6:36 p.m. UTC | #2
> >  error: Multiple top-level packages discovered in a flat-layout: ['patches', 'dtschema'].
> 
> Do you have a 'patches' directory? Not sure why that's a problem other
> than python having specific ideas on directory structures.

Oh, wow, yes, I had a 'patches' dir and that was really an issue. Weird.
Thanks for helping out. I got one step further, now I get:

  × Building wheel for pylibfdt (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [14 lines of output]
      WARNING setuptools_scm.pyproject_reading toml section missing 'pyproject.toml does not contain a tool.setuptools_scm section'
      Traceback (most recent call last):
        File "/tmp/pip-build-env-5v1x378l/normal/lib/python3.11/site-packages/setuptools_scm/_integration/pyproject_reading.py", line 36, in read_pyproject
          section = defn.get("tool", {})[tool_name]
                    ~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^
      KeyError: 'setuptools_scm'
      running bdist_wheel
      running build
      running build_py
      running build_ext
      building '_libfdt' extension
      swigging libfdt/libfdt.i to libfdt/libfdt_wrap.c
      swig -python -Ilibfdt -o libfdt/libfdt_wrap.c libfdt/libfdt.i
      error: command 'swig' failed: No such file or directory
      [end of output]
Rob Herring (Arm) Aug. 15, 2024, 8:36 p.m. UTC | #3
On Thu, Aug 15, 2024 at 12:36 PM Wolfram Sang
<wsa+renesas@sang-engineering.com> wrote:
>
>
> > >  error: Multiple top-level packages discovered in a flat-layout: ['patches', 'dtschema'].
> >
> > Do you have a 'patches' directory? Not sure why that's a problem other
> > than python having specific ideas on directory structures.
>
> Oh, wow, yes, I had a 'patches' dir and that was really an issue. Weird.
> Thanks for helping out. I got one step further, now I get:
>
>   × Building wheel for pylibfdt (pyproject.toml) did not run successfully.
>   │ exit code: 1
>   ╰─> [14 lines of output]
>       WARNING setuptools_scm.pyproject_reading toml section missing 'pyproject.toml does not contain a tool.setuptools_scm section'
>       Traceback (most recent call last):
>         File "/tmp/pip-build-env-5v1x378l/normal/lib/python3.11/site-packages/setuptools_scm/_integration/pyproject_reading.py", line 36, in read_pyproject
>           section = defn.get("tool", {})[tool_name]
>                     ~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^
>       KeyError: 'setuptools_scm'
>       running bdist_wheel
>       running build
>       running build_py
>       running build_ext
>       building '_libfdt' extension
>       swigging libfdt/libfdt.i to libfdt/libfdt_wrap.c
>       swig -python -Ilibfdt -o libfdt/libfdt_wrap.c libfdt/libfdt.i
>       error: command 'swig' failed: No such file or directory

You have to install 'swig' which is a C to python binding thing
pylibfdt uses. You should have a distro package for it. There's also a
pip package 'swig' that will download and build it. There's actually a
MR to make that a dependency I need to go look at.

Rob
Wolfram Sang Aug. 15, 2024, 9:23 p.m. UTC | #4
> >   × Building wheel for pylibfdt (pyproject.toml) did not run successfully.
> >   │ exit code: 1
> >   ╰─> [14 lines of output]
> >       WARNING setuptools_scm.pyproject_reading toml section missing 'pyproject.toml does not contain a tool.setuptools_scm section'

Thanks for bearing with me. I have to admit I stopped reading after
this...

> >       Traceback (most recent call last):
> >         File "/tmp/pip-build-env-5v1x378l/normal/lib/python3.11/site-packages/setuptools_scm/_integration/pyproject_reading.py", line 36, in read_pyproject
> >           section = defn.get("tool", {})[tool_name]
> >                     ~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^

... and this ...

> >       KeyError: 'setuptools_scm'
> >       running bdist_wheel
> >       running build
> >       running build_py
> >       running build_ext
> >       building '_libfdt' extension
> >       swigging libfdt/libfdt.i to libfdt/libfdt_wrap.c
> >       swig -python -Ilibfdt -o libfdt/libfdt_wrap.c libfdt/libfdt.i
> >       error: command 'swig' failed: No such file or directory

... so I totally missed this. It is even documented in README. Sorry!

> You have to install 'swig' which is a C to python binding thing
> pylibfdt uses. You should have a distro package for it. There's also a

It works now, thank you!

> pip package 'swig' that will download and build it. There's actually a
> MR to make that a dependency I need to go look at.

Sounds like a good idea to save you from support like here ;)

I will send out v2 in a few minutes.