12 Feb, 2014

2 commits

  • …ux-kernel/audio-display-linux-feature-tree into ti-linux-3.12.y

    TI-Feature: audio-display
    TI-Tree: git://git.ti.com/~darrene/ti-linux-kernel/audio-display-linux-feature-tree.git
    TI-Branch: audio-display-ti-linux-3.12.y

    * 'audio-display-ti-linux-3.12.y' of git://git.ti.com/~darrene/ti-linux-kernel/audio-display-linux-feature-tree:
    arm: dts: am437x-gp-evm: Add "sleep" state for lcd
    arm: dts: am43x-epos-evm: Add "sleep" state for lcd
    OMAPDSS: dpi: adopt pinctrl support

    Signed-off-by: Dan Murphy <DMurphy@ti.com>

    Dan Murphy
     
  • …egration-tree/connectivity-ti-linux-kernel into ti-linux-3.12.y

    TI-Feature: connectivity
    TI-Tree: git://git.ti.com/connectivity-integration-tree/connectivity-ti-linux-kernel.git
    TI-Branch: connectivity-ti-linux-3.12.y

    * 'connectivity-ti-linux-3.12.y' of git://git.ti.com/connectivity-integration-tree/connectivity-ti-linux-kernel: (22 commits)
    arm: dts: am4372: Add hdq device tree data.
    drivers: w1: omap_hdq: cleanup and bug fixes.
    w1: omap_hdq: Add compatible property for omap hdq driver.
    arm: mach-omap2: Remove device build from __init path.
    arm: hwmod: am437x-hdq: Add hwmod data for hdq1w.
    arm: dts: am43x-epos-evm: Resize qspi uboot and kernel partition size.
    arm: dts: dra7-evm: Resize qspi uboot and kernel partition size.
    usb: phy: am335x: Don't manage PHY power in suspend/resume
    usb: musb: dsps: Resume early in noirq context
    usb: musb: host: Don't resume port on bus_resume()
    arm: dts: am335x-evm: Add pinmux configuration for uart1
    arm: dts: am33xx: update pinmux configuration for mmc1
    serial: omap-serial : Enhance pinctrl support
    arm: dts: am335x-evm: add sleep states for i2c-1
    arm: dts: am33xx: add pinctrl sleep states for nand
    arm: dts: am33xx: add sleep states for pwm-tiecap pins
    ARM: mach-omap2: gpmc: adopt pinctrl support
    arm: dts: am335x-evm: add sleep states for gpio-matrix-keypad
    arm: dts: am33xx: add sleep states for gpio-led pins
    leds: leds-gpio: Enhance pinctrl support
    ...

    Conflicts:
    arch/arm/boot/dts/am335x-evmsk.dts

    Signed-off-by: Dan Murphy <DMurphy@ti.com>

    Dan Murphy
     

11 Feb, 2014

8 commits

  • Update omapdss/dpi driver to set the state of the pins to:
    - "default on enable
    - "sleep" on disable

    The disable and enable functions are called from a PM hook within
    omapdss so the sleep and default states will be used with suspend
    and resume, respectively.

    By optionally putting the pins into sleep state in the suspend callback
    we can accomplish two things.
    - minimize current leakage from pins and thus save power,
    - prevent the IP from driving pins output in an uncontrolled manner,
    which may happen if the power domain drops the domain regulator.

    Signed-off-by: Dave Gerlach
    Signed-off-by: Darren Etheridge

    Dave Gerlach
     
  • The patch adds the following to the omap hdq driver.
    1. HDQ Device reset call in probe.
    2. Enabling '1 wire mode' and checking for presence pulse bit.
    3. Proper disabling and enabling of interrupts during read path.
    4. Add re-initialization code during SKIP ROM command execution.
    5. Miscellaneous cleanup(formatting, return error checks).

    Signed-off-by: Sourav Poddar

    Sourav Poddar
     
  • Add compatible property for omap hdq driver.

    Signed-off-by: Sourav Poddar

    Sourav Poddar
     
  • In the AM335x case, the controller resumes early (noirq) and so
    would need the PHY to be powered up early as well. The existing
    implementation prevents us from doing that so don't manage PHY power
    in suspend/resume. Instead, we let the controller driver manage the
    PHY power.

    Signed-off-by: Roger Quadros

    Roger Quadros
     
  • The musb core driver resumes in noirq context so we must do so as well
    to ensure we are ready before musb core driver resumes.

    Not doing so breaks suspend/resume and causes delays upto 15 seconds
    with high-speed mass storage device connected to host.

    Signed-off-by: Roger Quadros

    Roger Quadros
     
  • The root hub port will be resumed by the hub driver using proper
    resume signal timing. There is no need for us to resume the port
    in bus_resume(). In fact, doing so breaks global suspend/resume
    and causes system resume delays of upto 15 seconds.

    Fixes D-01518 - AM335x: Connectivity/Power:
    Long resume time when there is USB MSC device connected to DUT

    Signed-off-by: Roger Quadros

    Roger Quadros
     
  • Update omap-serial driver to set the state of the pins to:
    - "sleep" on suspend
    - "default" on resume

    By optionally putting the pins into sleep state in the suspend callback
    we can accomplish two things.
    - minimize current leakage from pins and thus save power,
    - prevent the IP from driving pins output in an uncontrolled manner,
    which may happen if the power domain drops the domain regulator.

    Signed-off-by: Dave Gerlach

    Dave Gerlach
     
  • update leds-gpio driver to set the state of the pins to:

    - "sleep" on suspend
    - "default" on resume

    By optionally putting the pins into sleep state in the suspend callback
    we can accomplish two things.
    - minimize current leakage from pins and thus save power,
    - prevent the IP from driving pins output in an uncontrolled manner,
    which may happen if the power domain drops the domain regulator.

    suspend()/resume() callbacks are added which simply puts the pins to
    sleep/default state.

    Signed-off-by: Hebbar, Gururaja
    Signed-off-by: Dave Gerlach

    Hebbar, Gururaja
     

10 Feb, 2014

2 commits


07 Feb, 2014

28 commits

  • …nux-stable into ti-linux-3.12.y

    This is the 3.12.10 stable release

    * tag 'v3.12.10' of http://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable: (133 commits)
    Linux 3.12.10
    x86, cpu, amd: Add workaround for family 16h, erratum 793
    powerpc: Make sure "cache" directory is removed when offlining cpu
    powerpc: Fix the setup of CPU-to-Node mappings during CPU online
    btrfs: restrict snapshotting to own subvolumes
    Btrfs: handle EAGAIN case properly in btrfs_drop_snapshot()
    target/iscsi: Fix network portal creation race
    iscsi-target: Pre-allocate more tags to avoid ack starvation
    virtio-scsi: Fix hotcpu_notifier use-after-free with virtscsi_freeze
    SCSI: bfa: Chinook quad port 16G FC HBA claim issue
    usb: core: get config and string descriptors for unauthorized devices
    hpfs: remember free space
    ALSA: hda/hdmi - allow PIN_OUT to be dynamically enabled
    ALSA: hda - hdmi: introduce patch_nvhdmi()
    ALSA: hda - Don't set indep_hp flag for old AD codecs
    KVM: PPC: e500: Fix bad address type in deliver_tlb_misss()
    KVM: PPC: Book3S HV: use xics_wake_cpu only when defined
    parisc: fix cache-flushing
    alpha: fix broken network checksum
    inet_diag: fix inet_diag_dump_icsk() timewait socket state logic
    ...

    Signed-off-by: Dan Murphy <DMurphy@ti.com>

    Dan Murphy
     
  • The driver does not clear LCD_V2_TFT_24BPP_MODE and
    LCD_V2_TFT_24BPP_UNPACK bits properly, when those features are not in
    use. This cases RGB565 and packed RGB24 to fail.

    So clear the bits.

    Signed-off-by: Tomi Valkeinen
    Signed-off-by: Darren Etheridge

    Tomi Valkeinen
     
  • On resume the screen contents were not being restored properly. Looking at
    other DRM drivers it seems a call to drm_helper_resume_force_mode() is needed
    in the resume handler to force restoration of the mode and framebuffer data.

    Signed-off-by: Darren Etheridge

    Darren Etheridge
     
  • A call to pm_set_vt_switch() is added to driver initialization to
    allow the device to go into suspend without the need for VT interaction
    (entering ctrl-c on the console).

    Signed-off-by: Darren Etheridge

    Darren Etheridge
     
  • Fix error introduced by commit
    c1e9c32b2832bb636a9a2164300f85056d36d679 during build when
    CONFIG_DRM_TILCDC=y is selected:

    drivers/gpu/drm/tilcdc/tilcdc_drv.c: In function ‘tilcdc_pm_suspend’:
    drivers/gpu/drm/tilcdc/tilcdc_drv.c:546:36: error: ‘struct device’ has
    no member named ‘dev’

    Signed-off-by: Dave Gerlach
    Signed-off-by: Darren Etheridge

    Dave Gerlach
     
  • commit ee291e63293146db64668e8d65eb35c97e8324f4 upstream.

    When creating network portals rapidly, such as when restoring a
    configuration, LIO's code to reuse existing portals can return a false
    negative if the thread hasn't run yet and set np_thread_state to
    ISCSI_NP_THREAD_ACTIVE. This causes an error in the network stack
    when attempting to bind to the same address/port.

    This patch sets NP_THREAD_ACTIVE before the np is placed on g_np_list,
    so even if the thread hasn't run yet, iscsit_get_np will return the
    existing np.

    Also, convert np_lock -> np_mutex + hold across adding new net portal
    to g_np_list to prevent a race where two threads may attempt to create
    the same network portal, resulting in one of them failing.

    (nab: Add missing mutex_unlocks in iscsit_add_np failure paths)
    (DanC: Fix incorrect spin_unlock -> spin_unlock_bh)

    Signed-off-by: Andy Grover
    Signed-off-by: Nicholas Bellinger
    Signed-off-by: Greg Kroah-Hartman

    Andy Grover
     
  • commit 4a4caa29f1abcb14377e05d57c0793d338fb945d upstream.

    This patch addresses an traditional iscsi-target fabric ack starvation
    issue where iscsit_allocate_cmd() -> percpu_ida_alloc_state() ends up
    hitting slow path percpu-ida code, because iscsit_ack_from_expstatsn()
    is expected to free ack'ed tags after tag allocation.

    This is done to take into account the tags waiting to be acknowledged
    and released in iscsit_ack_from_expstatsn(), but who's number are not
    directly limited by the CmdSN Window queue_depth being enforced by
    the target.

    So that said, this patch bumps up the pre-allocated number of
    per session tags to:

    (max(queue_depth, ISCSIT_MIN_TAGS) * 2) + ISCSIT_EXTRA_TAGS

    for good measure to avoid the percpu_ida_alloc_state() slow path.

    Signed-off-by: Nicholas Bellinger
    Signed-off-by: Greg Kroah-Hartman

    Nicholas Bellinger
     
  • commit f466f75385369a181409e46da272db3de6f5c5cb upstream.

    vqs are freed in virtscsi_freeze but the hotcpu_notifier is not
    unregistered. We will have a use-after-free usage when the notifier
    callback is called after virtscsi_freeze.

    Fixes: 285e71ea6f3583a85e27cb2b9a7d8c35d4c0d558
    ("virtio-scsi: reset virtqueue affinity when doing cpu hotplug")

    Signed-off-by: Asias He
    Reviewed-by: Paolo Bonzini
    Signed-off-by: Jason Wang
    Signed-off-by: Rusty Russell
    Signed-off-by: Greg Kroah-Hartman

    Asias He
     
  • commit dcaf9aed995c2b2a49fb86bbbcfa2f92c797ab5d upstream.

    Bfa driver crash is observed while pushing the firmware on to chinook
    quad port card due to uninitialized bfi_image_ct2 access which gets
    initialized only for CT2 ASIC based cards after request_firmware().
    For quard port chinook (CT2 ASIC based), bfi_image_ct2 is not getting
    initialized as there is no check for chinook PCI device ID before
    request_firmware and instead bfi_image_cb is initialized as it is the
    default case for card type check.

    This patch includes changes to read the right firmware for quad port chinook.

    Signed-off-by: Vijaya Mohan Guvva
    Signed-off-by: James Bottomley
    Signed-off-by: Greg Kroah-Hartman

    Vijaya Mohan Guvva
     
  • commit 83e83ecb79a8225e79bc8e54e9aff3e0e27658a2 upstream.

    There is no need to skip querying the config and string descriptors for
    unauthorized WUSB devices when usb_new_device is called. It is allowed
    by WUSB spec. The only action that needs to be delayed until
    authorization time is the set config. This change allows user mode
    tools to see the config and string descriptors earlier in enumeration
    which is needed for some WUSB devices to function properly on Android
    systems. It also reduces the amount of divergent code paths needed
    for WUSB devices.

    Signed-off-by: Thomas Pugliese
    Signed-off-by: Greg Kroah-Hartman

    Thomas Pugliese
     
  • [ Upstream commit cefe0078eea52af17411eb1248946a94afb84ca5 ]

    This patch removes grant transfer releasing code from netfront, and uses
    gnttab_end_foreign_access to end grant access since
    gnttab_end_foreign_access_ref may fail when the grant entry is
    currently used for reading or writing.

    * clean up grant transfer code kept from old netfront(2.6.18) which grants
    pages for access/map and transfer. But grant transfer is deprecated in current
    netfront, so remove corresponding release code for transfer.

    * fix resource leak, release grant access (through gnttab_end_foreign_access)
    and skb for tx/rx path, use get_page to ensure page is released when grant
    access is completed successfully.

    Xen-blkfront/xen-tpmfront/xen-pcifront also have similar issue, but patches
    for them will be created separately.

    V6: Correct subject line and commit message.

    V5: Remove unecessary change in xennet_end_access.

    V4: Revert put_page in gnttab_end_foreign_access, and keep netfront change in
    single patch.

    V3: Changes as suggestion from David Vrabel, ensure pages are not freed untill
    grant acess is ended.

    V2: Improve patch comments.

    Signed-off-by: Annie Li
    Signed-off-by: David S. Miller
    Signed-off-by: Greg Kroah-Hartman

    Annie Li
     
  • [ Upstream commit d0bc65557ad09a57b4db176e9e3ccddb26971453 ]

    Make sure the practice set by commit 0afb166 "vxlan: Add capability
    of Rx checksum offload for inner packet" is applied when the skb
    goes through the portion of the RX code which is shared between
    vxlan netdevices and ovs vxlan port instances.

    Cc: Joseph Gasparakis
    Cc: Pravin B Shelar
    Signed-off-by: Or Gerlitz
    Signed-off-by: David S. Miller
    Signed-off-by: Greg Kroah-Hartman

    Or Gerlitz
     
  • [ Upstream commit a926592f5e4e900f3fa903298c4619a131e60963 ]

    rhine_reset_task() misses to disable the tx scheduler upon reset,
    this can lead to a crash if work is still scheduled while we're resetting
    the tx queue.

    Fixes:
    [ 93.591707] BUG: unable to handle kernel NULL pointer dereference at 0000004c
    [ 93.595514] IP: [] rhine_napipoll+0x491/0x6

    Signed-off-by: Richard Weinberger
    Signed-off-by: David S. Miller
    Signed-off-by: Greg Kroah-Hartman

    Richard Weinberger
     
  • [ Upstream commit fdc3452cd2c7b2bfe0f378f92123f4f9a98fa2bd ]

    Commit 60e453a940ac ("USBNET: fix handling padding packet")
    added an extra SG entry in case padding is necessary, but
    failed to update the initialisation of the list. This can
    cause list traversal to fall off the end of the list,
    resulting in an oops.

    Fixes: 60e453a940ac ("USBNET: fix handling padding packet")
    Reported-by: Thomas Kear
    Cc: Ming Lei
    Signed-off-by: Bjørn Mork
    Tested-by: Ming Lei
    Signed-off-by: David S. Miller
    Signed-off-by: Greg Kroah-Hartman

    Bjørn Mork
     
  • [ Upstream commit 95e92fd40c967c363ad66b2fd1ce4dcd68132e54 ]

    bnx2x triggers warnings with CONFIG_DMA_API_DEBUG=y:

    WARNING: CPU: 0 PID: 2253 at lib/dma-debug.c:887 check_unmap+0xf8/0x920()
    bnx2x 0000:28:00.0: DMA-API: device driver frees DMA memory with
    different size [device address=0x00000000da2b389e] [map size=1490 bytes]
    [unmap size=66 bytes]

    The reason is that bnx2x splits a TSO BD into two BDs (headers + data)
    using one DMA mapping for both, but it uses only the length of the first
    BD when unmapping.

    This patch fixes the bug by unmapping the whole length of the two BDs.

    Signed-off-by: Michal Schmidt
    Reviewed-by: Eric Dumazet
    Acked-by: Dmitry Kravkov
    Signed-off-by: David S. Miller
    Signed-off-by: Greg Kroah-Hartman

    Michal Schmidt
     
  • commit 032f708bc4f6da868ec49dac48ddf3670d8035d3 upstream.

    The locations of SMBus register base address and enablement bit are changed
    from AMD ML, which need this patch to be supported.

    Signed-off-by: Shane Huang
    Reviewed-by: Jean Delvare
    Signed-off-by: Wolfram Sang
    Signed-off-by: Greg Kroah-Hartman

    Shane Huang
     
  • commit 6cf70ae928bae17077efc0d528dec49bc380438b upstream.

    The first variants of Armada XP SoCs (A0 stepping) have issues related
    to the i2c controller which prevent to use the offload mechanism and
    lead to a kernel hang during boot.

    The commit introduces a new the compatible string
    marvell,mv78230-a0-i2c for the i2c controller. When this compatible
    string is used the driver disables the offload mechanism and the
    kernel no more hangs on these SoCs.

    Signed-off-by: Gregory CLEMENT
    Reported-by: Andrew Lunn
    Acked-by: Wolfram Sang
    Acked-by: Arnd Bergmann
    Fixes: 930ab3d403ae (i2c: mv64xxx: Add I2C Transaction Generator support)
    Signed-off-by: Jason Cooper
    Signed-off-by: Greg Kroah-Hartman

    Gregory CLEMENT
     
  • commit b0ad4ff35d479a46a3b995a299db9aeb097acfce upstream.

    The DriveGuard chips on the new HP laptops are with a new PnP ID
    "HPQ6007". It should be compatible with older chips.

    Acked-by: Éric Piel
    Signed-off-by: Takashi Iwai
    Signed-off-by: Matthew Garrett
    Signed-off-by: Greg Kroah-Hartman

    Takashi Iwai
     
  • commit da4a04126baa3be03bc566d4a2ee0944c5e783d0 upstream.

    Dan and Sergey reported that there is a racy between reset and flushing
    of pending work so that it could make oops by freeing zram->meta in
    reset while zram_slot_free can access zram->meta if new request is
    adding during the race window.

    This patch moves flush after taking init_lock so it prevents new request
    so that it closes the race.

    Signed-off-by: Minchan Kim
    Reported-by: Dan Carpenter
    Cc: Nitin Gupta
    Cc: Jerome Marchand
    Tested-by: Sergey Senozhatsky
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds
    Signed-off-by: Greg Kroah-Hartman

    Minchan Kim
     
  • commit ef71ec00002d92a08eb27e9d036e3d48835b6597 upstream.

    The code that handles overlapping extents that we've just read back in from disk
    was depending on the behaviour of the code that handles overlapping extents as
    we're inserting into a btree node in the case of an insert that forced an
    existing extent to be split: on insert, if we had to split we'd also insert a
    new extent to represent the top part of the old extent - and then that new
    extent would get written out.

    The code that read the extents back in thus not bother with splitting extents -
    if it saw an extent that ovelapped in the middle of an older extent, it would
    trim the old extent to only represent the bottom part, assuming that the
    original insert would've inserted a new extent to represent the top part.

    I still haven't figured out _how_ it can happen, but I'm now pretty convinced
    (and testing has confirmed) that there's some kind of an obscure corner case
    (probably involving extent merging, and multiple overwrites in different sets)
    that breaks this. The fix is to change the mergesort fixup code to split extents
    itself when required.

    Signed-off-by: Kent Overstreet
    Signed-off-by: Greg Kroah-Hartman

    Kent Overstreet
     
  • commit ecd75ad514d73efc1bbcc5f10a13566c3ace5f53 upstream.

    For some reason, some early WD drives spin up and down drives
    erratically when the link is put into slumber mode which can reduce
    the life expectancy of the device significantly. Unfortunately, we
    don't have full list of devices and given the nature of the issue it'd
    be better to err on the side of false positives than the other way
    around. Let's disable LPM on all WD devices which match one of the
    known problematic model prefixes and are SATA-I.

    As horkage list doesn't support matching SATA capabilities, this is
    implemented as two horkages - WD_BROKEN_LPM and NOLPM. The former is
    set for the known prefixes and sets the latter if the matched device
    is SATA-I.

    Note that this isn't optimal as this disables all LPM operations and
    partial link power state reportedly works fine on these; however, the
    way LPM is implemented in libata makes it difficult to precisely map
    libata LPM setting to specific link power state. Well, these devices
    are already fairly outdated. Let's just disable whole LPM for now.

    Signed-off-by: Tejun Heo
    Reported-and-tested-by: Nikos Barkas
    Reported-and-tested-by: Ioannis Barkas
    References: https://bugzilla.kernel.org/show_bug.cgi?id=57211
    Signed-off-by: Greg Kroah-Hartman

    Tejun Heo
     
  • commit 9013d64e661fc2a37a1742670202171c27fef4b5 upstream.

    On Armada 370/XP SoCs, once a disk is removed from a SATA port, then the
    re-plug events are not detected by the sata_mv driver. This patch fixes
    the issue by updating the PHY speed in the LP_PHY_CTL register (0x58)
    according to the SControl speed.

    Note that this fix is only applied if the compatible string
    "marvell,armada-370-sata" is found in the SATA DT node.

    Fixes: 9ae6f740b49f ("arm: mach-mvebu: add support for Armada 370 and Armada XP with DT")
    Signed-off-by: Lior Amsalem
    Signed-off-by: Nadav Haklai
    Signed-off-by: Simon Guinot
    Cc: Thomas Petazzoni
    Cc: Jason Cooper
    Cc: Andrew Lunn
    Cc: Gregory Clement
    Cc: Sebastian Hesselbarth
    Acked-by: Jason Cooper
    Signed-off-by: Tejun Heo
    Signed-off-by: Greg Kroah-Hartman

    Lior Amsalem
     
  • commit b1f5c73bd5a4752efb7d7af019034044b08aafe9 upstream.

    The sata_mv driver supports the SATA IP found in several Marvell SoCs.
    As some new SATA registers have been introduced with the Armada 370/XP
    SoCs, a way to identify them is needed.

    This patch introduces a new compatible string for the SATA IP found in
    Armada 370/XP SoCs.

    Signed-off-by: Simon Guinot
    Cc: Thomas Petazzoni
    Cc: Jason Cooper
    Cc: Andrew Lunn
    Cc: Gregory Clement
    Cc: Sebastian Hesselbarth
    Cc: Lior Amsalem
    Acked-by: Jason Cooper
    Signed-off-by: Tejun Heo
    Signed-off-by: Greg Kroah-Hartman

    Simon Guinot
     
  • commit 747d35bd9bb4ae6bd74b19baa5bbe32f3e0cee11 upstream.

    Depending on the implementation strcmp might return the difference between
    two strings not only -1,0,1 consequently
    if (strcmp (a,b) == -1)
    might lead to taking the wrong branch

    -> compare with < 0 instead,
    which in any case is more canonical.

    Signed-off-by: Peter Huewe
    Signed-off-by: Greg Kroah-Hartman

    Peter Huewe
     
  • commit 85c5e0d451125c6ddb78663972e40af810b83644 upstream.

    The 'get_burstcount' function can in some circumstances 'return -EBUSY' which
    in tpm_stm_i2c_send is stored in an 'u32 burstcnt'
    thus converting the signed value into an unsigned value, resulting
    in 'burstcnt' being huge.
    Changing the type to u32 only does not solve the problem as the signed
    value is converted to an unsigned in I2C_WRITE_DATA, resulting in the
    same effect.

    Thus
    -> Change type of burstcnt to u32 (the return type of get_burstcount)
    -> Add a check for the return value of 'get_burstcount' and propagate a
    potential error.

    This makes also sense in the 'I2C_READ_DATA' case, where the there is no
    signed/unsigned conversion.

    found by coverity
    Signed-off-by: Peter Huewe
    Signed-off-by: Greg Kroah-Hartman

    Peter Huewe
     
  • commit 74142ffc0b52cfe6f9d2f6f34a5f3eedbfe3ce51 upstream.

    The regmap used by max77686 MFD driver was not freed with regmap_exit()
    on driver exit. This lead to leak of resources.

    Replace regmap_init_i2c() call in driver probe with initialization of
    managed register map so the regmap will be properly freed by the device
    management code.

    Signed-off-by: Krzysztof Kozlowski
    Signed-off-by: Lee Jones
    Signed-off-by: Greg Kroah-Hartman

    Krzysztof Kozlowski
     
  • commit fa8cf57c923e86a693a85aff1df579245a27cbb3 upstream.

    Some GPIO users, such as fixed-regulator, request GPIO output with
    initial value of 1. This was ignored by sunxi driver.

    Signed-off-by: Chen-Yu Tsai
    Acked-by: Maxime Ripard
    Signed-off-by: Linus Walleij
    Signed-off-by: Greg Kroah-Hartman

    Chen-Yu Tsai
     
  • commit 75ea799df4cb07e505c91b4abaa87bc28aad3e66 upstream.

    The current MAX8907 driver has two issues related to weekday value
    handling:

    1)

    The HW WEEKDAY register has range 0..6 rather than 1..7 as documented.
    Note that I validated the actual HW range by observing the HW register
    roll from 6->0 rather than 6->7->1 as would otherwise be expected.

    This matches Linux's tm_wday range of 0..6.

    When the CMOS RAM content is lost, the date returned from the device is
    2007-01-01 00:00:00, which is a Monday. The WEEKDAY register reads 1 in
    this case. This matches the numbering in Linux's tm_wday field.

    Hence we should write Linux's tm_wday value to the register without
    modifying it. Hence, remove the +1/-1 calculations for WEEKDAY/tm_wday.

    2)

    There's no need to make alarms match on the WEEKDAY register, since the
    other fields together uniquely define the alarm date/time. Ignoring the
    WEEKDAY value in the match isolates the driver from any incorrect value in
    the current time copy of the WEEKDAY register.

    Each change individually, or both together, solves an issue that I
    observed; "hwclock -r" would time out waiting for its alarm to fire if the
    CMOS RAM content had been lost, and hence the WEEKDAY register value
    mismatched what the driver expected it to be. "hwclock -w" would solve
    this by over-writing the HW default WEEKDAY register value with what the
    driver expected.

    Signed-off-by: Stephen Warren
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds
    Signed-off-by: Greg Kroah-Hartman

    Stephen Warren