Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I2c : do not rename added devices, and a minor dtsi fix #49

Closed
wants to merge 2 commits into from

Commits on Feb 11, 2016

  1. i2c: aspeed: Don't rename added devices

    Changing the name of a device with dev_set_name after device_add
    is not allowed.
    
    However, of_create_device takes a bus_id parameter that specifies
    the name of the platform device being added.
    
    This does mean the bus property has to be retrieved multiple times.
    Creation is skiped if there is trouble retrieving or formatting
    the name.
    
    The documentation for kobject_set_name (non-vargs) says:
     * This sets the name of the kobject.  If you have already added the
     * kobject to the system, you must call kobject_rename() in order to
     * change the name of the kobject.
    
    As the kernel doc for device_rename says:
     * Make up a "real" name in the driver before you register anything, or add
     * some other attributes for userspace to find the device, or use udev to add
     * symlinks -- but never rename kernel devices later, it's a complete mess. We
     * don't even want to get into that and try to implement the missing pieces in
     * the core. We really have other pieces to fix in the driver core mess. :)
    
    before:
    1e78a000.i2c/1e78a1c0.i2c-bus/i2c-6/i2c-dev/i2c-6
    1e78a000.i2c/1e78a180.i2c-bus/i2c-5/i2c-dev/i2c-5
    1e78a000.i2c/1e78a140.i2c-bus/i2c-4/i2c-dev/i2c-4
    1e78a000.i2c/1e78a100.i2c-bus/i2c-3/i2c-dev/i2c-3
    1e78a000.i2c/1e78a100.i2c-bus/i2c-3/3-0050
    1e78a000.i2c/1e78a0c0.i2c-bus/i2c-2/i2c-dev/i2c-2
    1e78a000.i2c/1e78a0c0.i2c-bus/i2c-2/2-004c/hwmon/hwmon0
    1e78a000.i2c/1e78a080.i2c-bus/i2c-1/i2c-dev/i2c-1
    1e78a000.i2c/1e78a040.i2c-bus/i2c-0/i2c-dev/i2c-0
    1e78a000.i2c/1e78a040.i2c-bus/i2c-0/0-0050
    1e78a000.i2c/1e78a040.i2c-bus/i2c-0/0-0068/rtc/rtc0
    1e78a000.i2c/1e78a340.i2c-bus/i2c-8/i2c-dev/i2c-8
    
    after:
    1e78a000.i2c/i2c-0/i2c-0/i2c-dev/i2c-0
    1e78a000.i2c/i2c-0/i2c-0/0-0050
    1e78a000.i2c/i2c-0/i2c-0/0-0068/rtc/rtc0
    1e78a000.i2c/i2c-1/i2c-1/i2c-dev/i2c-1
    1e78a000.i2c/i2c-2/i2c-2/i2c-dev/i2c-2
    1e78a000.i2c/i2c-2/i2c-2/2-004c/hwmon/hwmon0
    1e78a000.i2c/i2c-3/i2c-3/i2c-dev/i2c-3
    1e78a000.i2c/i2c-3/i2c-3/3-0050
    1e78a000.i2c/i2c-4/i2c-4/i2c-dev/i2c-4
    1e78a000.i2c/i2c-5/i2c-5/i2c-dev/i2c-5
    1e78a000.i2c/i2c-6/i2c-6/i2c-dev/i2c-6
    1e78a000.i2c/i2c-7/i2c-7/i2c-dev/i2c-7
    
    1e62000.fmc                   1e78e000.serial
    1e62000.fmc:flash@0           1e78f000.serial
    1e630000.spi                   ahb
    1e630000.spi:flash             ahb:apb
    1e660000.ethernet              alarmtimer
    1e6c0080.interrupt-controller  i2c-0
    1e6e2000.syscon                i2c-1
    1e720000.sram                  i2c-2
    1e780000.gpio                  i2c-3
    1e782000.timer                 i2c-4
    1e783000.serial                i2c-5
    1e784000.serial                i2c-6
    1e785000.wdt                   i2c-7
    1e787000.vuart                 i2c-8
    1e789140.ibt                   leds
    1e78a000.i2c                   serial8250
    1e78d000.serial
    
    Signed-off-by: Milton Miller <[email protected]>
    mdmillerii committed Feb 11, 2016
    Configuration menu
    Copy the full SHA
    1446bff View commit details
    Browse the repository at this point in the history
  2. arm: dts: unit address should not have 0x prefix

    The implied format for most bus bindings implies the uname-address
    part of the unit-name should be in hex without a leading 0x.
    
    Fix the one i2c bus that did not follow this convention.
    
    Signed-off-by: Milton Miller <[email protected]>
    mdmillerii committed Feb 11, 2016
    Configuration menu
    Copy the full SHA
    de5786f View commit details
    Browse the repository at this point in the history