09 Jan, 2012

1 commit

  • * 'pm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (76 commits)
    PM / Hibernate: Implement compat_ioctl for /dev/snapshot
    PM / Freezer: fix return value of freezable_schedule_timeout_killable()
    PM / shmobile: Allow the A4R domain to be turned off at run time
    PM / input / touchscreen: Make st1232 use device PM QoS constraints
    PM / QoS: Introduce dev_pm_qos_add_ancestor_request()
    PM / shmobile: Remove the stay_on flag from SH7372's PM domains
    PM / shmobile: Don't include SH7372's INTCS in syscore suspend/resume
    PM / shmobile: Add support for the sh7372 A4S power domain / sleep mode
    PM: Drop generic_subsys_pm_ops
    PM / Sleep: Remove forward-only callbacks from AMBA bus type
    PM / Sleep: Remove forward-only callbacks from platform bus type
    PM: Run the driver callback directly if the subsystem one is not there
    PM / Sleep: Make pm_op() and pm_noirq_op() return callback pointers
    PM/Devfreq: Add Exynos4-bus device DVFS driver for Exynos4210/4212/4412.
    PM / Sleep: Merge internal functions in generic_ops.c
    PM / Sleep: Simplify generic system suspend callbacks
    PM / Hibernate: Remove deprecated hibernation snapshot ioctls
    PM / Sleep: Fix freezer failures due to racy usermodehelper_is_disabled()
    ARM: S3C64XX: Implement basic power domain support
    PM / shmobile: Use common always on power domain governor
    ...

    Fix up trivial conflict in fs/xfs/xfs_buf.c due to removal of unused
    XBT_FORCE_SLEEP bit

    Linus Torvalds
     

22 Dec, 2011

1 commit


10 Dec, 2011

1 commit


25 Oct, 2011

1 commit

  • * 'driver-core-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: (38 commits)
    mm: memory hotplug: Check if pages are correctly reserved on a per-section basis
    Revert "memory hotplug: Correct page reservation checking"
    Update email address for stable patch submission
    dynamic_debug: fix undefined reference to `__netdev_printk'
    dynamic_debug: use a single printk() to emit messages
    dynamic_debug: remove num_enabled accounting
    dynamic_debug: consolidate repetitive struct _ddebug descriptor definitions
    uio: Support physical addresses >32 bits on 32-bit systems
    sysfs: add unsigned long cast to prevent compile warning
    drivers: base: print rejected matches with DEBUG_DRIVER
    memory hotplug: Correct page reservation checking
    memory hotplug: Refuse to add unaligned memory regions
    remove the messy code file Documentation/zh_CN/SubmitChecklist
    ARM: mxc: convert device creation to use platform_device_register_full
    new helper to create platform devices with dma mask
    docs/driver-model: Update device class docs
    docs/driver-model: Document device.groups
    kobj_uevent: Ignore if some listeners cannot handle message
    dynamic_debug: make netif_dbg() call __netdev_printk()
    dynamic_debug: make netdev_dbg() call __netdev_printk()
    ...

    Linus Torvalds
     

27 Aug, 2011

1 commit

  • compared to the most powerful and already existing helper (namely
    platform_device_register_resndata) this allows to specify a dma_mask.
    To make eventual extensions later more easy, a struct holding the used
    information is created instead of passing the information by function
    parameters.

    Signed-off-by: Uwe Kleine-König
    Signed-off-by: Greg Kroah-Hartman

    Uwe Kleine-König
     

23 Aug, 2011

1 commit

  • If id_entry is available then it is used. However if we remove first the
    driver followed by the device, then the id_entry is pointing to driver's
    memory which is long gone.
    Since id->name and plat->name are equal there is no point in
    distinguishing them.

    Cc: Grant Likely
    Cc: linux-kernel@vger.kernel.org
    Signed-off-by: Sebastian Andrzej Siewior
    Signed-off-by: Greg Kroah-Hartman

    Sebastian Andrzej Siewior
     

09 Aug, 2011

1 commit


08 Jul, 2011

1 commit

  • On some architectures we need to setup pdev_archdata before we add the
    device. Waiting til a bus_notifier is too late since we might need the
    pdev_archdata in the bus notifier. One example is setting up of dma_mask
    pointers such that it can be used in a bus_notifier.

    We add weak noop version of arch_setup_pdev_archdata() and allow the arch
    code to override with access the full definitions of struct device,
    struct platform_device, and struct pdev_archdata.

    Acked-by: Greg Kroah-Hartman
    Signed-off-by: Kumar Gala

    Kumar Gala
     

08 Jun, 2011

1 commit

  • This reverts 737a3bb9416ce2a7c7a4 ("Driver core: move platform device
    creation helpers to .init.text (if MODULE=n)"). That patch assumed that
    platform_device_register_resndata() is only ever called from __init code
    but that isn't true in the case ioctl->drm_ioctl->radeon_cp_init().

    Addresses https://bugzilla.kernel.org/show_bug.cgi?id=35192

    Cc: Uwe Kleine-König
    Reported-by: Anthony Basile
    Cc: Greg KH
    Cc: David Airlie
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Greg Kroah-Hartman

    Andrew Morton
     

20 May, 2011

1 commit

  • …/gregkh/driver-core-2.6

    * 'driver-core-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6: (44 commits)
    debugfs: Silence DEBUG_STRICT_USER_COPY_CHECKS=y warning
    sysfs: remove "last sysfs file:" line from the oops messages
    drivers/base/memory.c: fix warning due to "memory hotplug: Speed up add/remove when blocks are larger than PAGES_PER_SECTION"
    memory hotplug: Speed up add/remove when blocks are larger than PAGES_PER_SECTION
    SYSFS: Fix erroneous comments for sysfs_update_group().
    driver core: remove the driver-model structures from the documentation
    driver core: Add the device driver-model structures to kerneldoc
    Translated Documentation/email-clients.txt
    RAW driver: Remove call to kobject_put().
    reboot: disable usermodehelper to prevent fs access
    efivars: prevent oops on unload when efi is not enabled
    Allow setting of number of raw devices as a module parameter
    Introduce CONFIG_GOOGLE_FIRMWARE
    driver: Google Memory Console
    driver: Google EFI SMI
    x86: Better comments for get_bios_ebda()
    x86: get_bios_ebda_length()
    misc: fix ti-st build issues
    params.c: Use new strtobool function to process boolean inputs
    debugfs: move to new strtobool
    ...

    Fix up trivial conflicts in fs/debugfs/file.c due to the same patch
    being applied twice, and an unrelated cleanup nearby.

    Linus Torvalds
     

17 May, 2011

1 commit


29 Apr, 2011

2 commits


23 Apr, 2011

4 commits


13 Apr, 2011

1 commit


12 Apr, 2011

2 commits

  • In order for MFD drivers to fetch their cell pointer but also their
    platform data one, an mfd cell pointer is added to the platform_device
    structure.
    That allows all MFD sub devices drivers to be MFD agnostic, unless
    they really need to access their MFD cell data. Most of them don't,
    especially the ones for IPs used by both MFD and non MFD SoCs.

    Cc: Grant Likely
    Acked-by: Greg KH
    Signed-off-by: Samuel Ortiz

    Samuel Ortiz
     
  • Xen save/restore is going to use hibernate device callbacks for
    quiescing devices and putting them back to normal operations and it
    would need to select CONFIG_HIBERNATION for this purpose. However,
    that also would cause the hibernate interfaces for user space to be
    enabled, which might confuse user space, because the Xen kernels
    don't support hibernation. Moreover, it would be wasteful, as it
    would make the Xen kernels include a substantial amount of code that
    they would never use.

    To address this issue introduce new power management Kconfig option
    CONFIG_HIBERNATE_CALLBACKS, such that it will only select the code
    that is necessary for the hibernate device callbacks to work and make
    CONFIG_HIBERNATION select it. Then, Xen save/restore will be able to
    select CONFIG_HIBERNATE_CALLBACKS without dragging the entire
    hibernate code along with it.

    Signed-off-by: Rafael J. Wysocki
    Tested-by: Shriram Rajagopalan

    Rafael J. Wysocki
     

25 Oct, 2010

1 commit

  • * 'next-devicetree' of git://git.secretlab.ca/git/linux-2.6:
    mtd/m25p80: add support to parse the partitions by OF node
    of/irq: of_irq.c needs to include linux/irq.h
    of/mips: Cleanup some include directives/files.
    of/mips: Add device tree support to MIPS
    of/flattree: Eliminate need to provide early_init_dt_scan_chosen_arch
    of/device: Rework to use common platform_device_alloc() for allocating devices
    of/xsysace: Fix OF probing on little-endian systems
    of: use __be32 types for big-endian device tree data
    of/irq: remove references to NO_IRQ in drivers/of/platform.c
    of/promtree: add package-to-path support to pdt
    of/promtree: add of_pdt namespace to pdt code
    of/promtree: no longer call prom_ functions directly; use an ops structure
    of/promtree: make drivers/of/pdt.c no longer sparc-only
    sparc: break out some PROM device-tree building code out into drivers/of
    of/sparc: convert various prom_* functions to use phandle
    sparc: stop exporting openprom.h header
    powerpc, of_serial: Endianness issues setting up the serial ports
    of: MTD: Fix OF probing on little-endian systems
    of: GPIO: Fix OF probing on little-endian systems

    Linus Torvalds
     

23 Oct, 2010

4 commits

  • There's no need to explicitly check for data and resources being NULL,
    as platform_device_add_{data,resources}() do this internally nowadays.

    This makes the code more linear and less indented.

    Signed-off-by: Anton Vorontsov
    Signed-off-by: Greg Kroah-Hartman

    Anton Vorontsov
     
  • Some users of platform_device_add_{data,resources}() assume that
    NULL data and resources will be handled specially, i.e. just ignored.

    But the platform core ends up calling kmemdup(NULL, 0, ...), which
    returns a non-NULL result (i.e. ZERO_SIZE_PTR), which causes drivers
    to oops on a valid code, something like:

    if (platform_data)
    stuff = platform_data->stuff;

    This patch makes the platform core a bit more safe for such cases.

    Signed-off-by: Anton Vorontsov
    Signed-off-by: Greg Kroah-Hartman

    Anton Vorontsov
     
  • Currently, the platform_bus allows customization of several of the
    busses dev_pm_ops methods by using weak symbols so that platform code
    can override them. The weak-symbol approach is not scalable when
    wanting to support multiple platforms in a single kernel binary.

    Instead, provide __init methods for platform code to customize the
    dev_pm_ops methods at runtime.

    NOTE: after these dynamic methods are merged, the weak symbols should
    be removed from drivers/base/platform.c. AFAIK, this will only
    affect SH and sh-mobile which should be converted to use this
    runtime approach instead of the weak symbols. After SH &
    sh-mobile are converted, the weak symobols could be removed.

    Tested on OMAP3.

    Cc: Magnus Damm
    Acked-by: Grant Likely
    Signed-off-by: Kevin Hilman
    Signed-off-by: Greg Kroah-Hartman

    Kevin Hilman
     
  • In theory (although not *yet* in practice), a driver being passed
    to platform_driver_probe might have driver.bus set to something
    other than platform_bus_type. Locking drv->driver.bus is always
    correct.

    Signed-off-by: Patrick Pannuto
    Signed-off-by: Greg Kroah-Hartman

    Patrick Pannuto
     

22 Oct, 2010

1 commit

  • The current code allocates and manages platform_devices created from
    the device tree manually. It also uses an unsafe shortcut for
    allocating the platform_device and the resource table at the same
    time. (which I added in the last rework; sorry).

    This patch refactors the code to use platform_device_alloc() for
    allocating new devices. This reduces the amount of custom code
    implemented by of_platform, eliminates the unsafe alloc trick, and has
    the side benefit of letting the platform_bus code manage freeing the
    device data and resources when the device is freed.

    Signed-off-by: Grant Likely
    Cc: Benjamin Herrenschmidt
    Cc: Greg Kroah-Hartman
    Cc: "David S. Miller"
    Cc: Michal Simek

    Grant Likely
     

07 Aug, 2010

1 commit

  • * git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6: (28 commits)
    driver core: device_rename's new_name can be const
    sysfs: Remove owner field from sysfs struct attribute
    powerpc/pci: Remove owner field from attribute initialization in PCI bridge init
    regulator: Remove owner field from attribute initialization in regulator core driver
    leds: Remove owner field from attribute initialization in bd2802 driver
    scsi: Remove owner field from attribute initialization in ARCMSR driver
    scsi: Remove owner field from attribute initialization in LPFC driver
    cgroupfs: create /sys/fs/cgroup to mount cgroupfs on
    Driver core: Add BUS_NOTIFY_BIND_DRIVER
    driver core: fix memory leak on one error path in bus_register()
    debugfs: no longer needs to depend on SYSFS
    sysfs: Fix one more signature discrepancy between sysfs implementation and docs.
    sysfs: fix discrepancies between implementation and documentation
    dcdbas: remove a redundant smi_data_buf_free in dcdbas_exit
    dmi-id: fix a memory leak in dmi_id_init error path
    sysfs: sysfs_chmod_file's attr can be const
    firmware: Update hotplug script
    Driver core: move platform device creation helpers to .init.text (if MODULE=n)
    Driver core: reduce duplicated code for platform_device creation
    Driver core: use kmemdup in platform_device_add_resources
    ...

    Linus Torvalds
     

06 Aug, 2010

3 commits


24 Jul, 2010

2 commits

  • of_platform_bus was being used in the same manner as the platform_bus.
    The only difference being that of_platform_bus devices are generated
    from data in the device tree, and platform_bus devices are usually
    statically allocated in platform code. Having them separate causes
    the problem of device drivers having to be registered twice if it
    was possible for the same device to appear on either bus.

    This patch removes of_platform_bus_type and registers all of_platform
    bus devices and drivers on the platform bus instead. A previous patch
    made the of_device structure an alias for the platform_device structure,
    and a shim is used to adapt of_platform_drivers to the platform bus.

    After all of of_platform_bus drivers are converted to be normal platform
    drivers, the shim code can be removed.

    Signed-off-by: Grant Likely
    Acked-by: David S. Miller

    Grant Likely
     
  • As part of the merge between platform bus and of_platform bus, add the
    ability to do of-style matching to the platform bus.

    Signed-off-by: Grant Likely
    Acked-by: Greg Kroah-Hartman
    CC: Michal Simek
    CC: Grant Likely
    CC: Benjamin Herrenschmidt
    CC: Stephen Rothwell
    CC: linux-kernel@vger.kernel.org
    CC: microblaze-uclinux@itee.uq.edu.au
    CC: linuxppc-dev@ozlabs.org
    CC: devicetree-discuss@lists.ozlabs.org

    Grant Likely
     

22 May, 2010

1 commit

  • When runtime PM for platform_bus was added, it allowed for platforms
    to customize the runtime PM methods since they are defined as weak
    symbols.

    This patch allows platforms to also extend the system PM methods with
    custom hooks so runtime PM and system PM extensions can be managed
    together by custom platform-specific code.

    Signed-off-by: Kevin Hilman
    Cc: Magnus Damm
    Cc: Rafael Wysocki
    Cc: Dmitry Torokhov
    Cc: Eric Miao
    Signed-off-by: Greg Kroah-Hartman

    Kevin Hilman
     

21 May, 2010

1 commit

  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/suspend-2.6:
    PM: PM QOS update fix
    Freezer / cgroup freezer: Update stale locking comments
    PM / platform_bus: Allow runtime PM by default
    i2c: Fix bus-level power management callbacks
    PM QOS update
    PM / Hibernate: Fix block_io.c printk warning
    PM / Hibernate: Group swap ops
    PM / Hibernate: Move the first_sector out of swsusp_write
    PM / Hibernate: Separate block_io
    PM / Hibernate: Snapshot cleanup
    FS / libfs: Implement simple_write_to_buffer
    PM / Hibernate: document open(/dev/snapshot) side effects
    PM / Runtime: Add sysfs debug files
    PM: Improve device power management document
    PM: Update device power management document
    PM: Allow runtime_suspend methods to call pm_schedule_suspend()
    PM: pm_wakeup - switch to using bool

    Linus Torvalds
     

20 May, 2010

1 commit

  • * git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6: (127 commits)
    sh: update defconfigs.
    sh: Fix up the NUMA build for recent LMB changes.
    sh64: provide a stub per_cpu_trap_init() definition.
    sh: fix up CONFIG_KEXEC=n build.
    sh: fixup the docbook paths for clock framework shuffling.
    driver core: Early dev_name() depends on slab_is_available().
    sh: simplify WARN usage in SH clock driver
    sh: Check return value of clk_get on ms7724
    sh: Check return value of clk_get on ecovec24
    sh: move sh clock-cpg.c contents to drivers/sh/clk-cpg.c
    sh: move sh clock.c contents to drivers/sh/clk.
    sh: move sh asm/clock.h contents to linux/sh_clk.h V2
    sh: remove unused clock lookup
    sh: switch boards to clkdev
    sh: switch sh4-202 to clkdev
    sh: switch shx3 to clkdev
    sh: switch sh7757 to clkdev
    sh: switch sh7763 to clkdev
    sh: switch sh7780 to clkdev
    sh: switch sh7786 to clkdev
    ...

    Linus Torvalds
     

18 May, 2010

1 commit


13 May, 2010

2 commits

  • Paul Mundt
     
  • The early dev_name() setup needs to do an allocation which can only be
    satisfied under slab_is_available() conditions. Some of the early
    platform drivers may be initialized before this point, and those still
    need to contend themselves with an empty dev_name.

    This fixes up a regression with the SH earlyprintk which was bailing out
    prior to hitting the early probe path due to not being able to satisfy
    the early allocation. Other early platform drivers (such as the early
    timers) that need to match the dev name are sufficiently late that
    allocations are already possible.

    Signed-off-by: Paul Mundt

    Paul Mundt
     

11 May, 2010

1 commit

  • Currently the default runtime PM callbacks for platform devices return
    -ENOSYS, preventing the use of runtime PM platforms until they have
    provided at least a default implementation. This hinders the use of
    runtime PM by devices which work with many platforms such as memory
    mapped devices, MFDs and on chip IPs shared by multiple architectures.

    Change the default implementation to the standard pm_generic_runtime
    one, allowing drivers to use runtime PM without per-architecture
    changes.

    Signed-off-by: Mark Brown
    Acked-by: Greg Kroah-Hartman
    Signed-off-by: Rafael J. Wysocki

    Mark Brown
     

30 Mar, 2010

1 commit