Commit Graph

481420 Commits

Author SHA1 Message Date
Jiri Slaby
91905b6f4a parport: parport_pc, do not remove parent devices early
When the parport_pc module is removed from the system, all parport
devices are iterated in parport_pc_exit and removed by a call to
parport_pc_unregister_port. Note that some parport devices have its
'struct device' parent, known as port->dev.  And when port->dev is a
platform device, it is destroyed in parport_pc_exit too.

Now, when parport_pc_unregister_port is called for a going port,
drv->detach(port) is called for every parport driver in the system.
ppdev can be one of them. ppdev's detach() tears down its per-port
sysfs directory, which established port->dev as a parent earlier.

But since parport_pc_exit kills port->dev parents before unregisters
ports proper, ppdev's sysfs directory has no living parent anymore.
This results in the following warning:

WARNING: CPU: 1 PID: 785 at fs/sysfs/group.c:219 sysfs_remove_group+0x9b/0xa0
sysfs group ffffffff81c69e20 not found for kobject 'parport1'
Modules linked in: parport_pc(E-) ppdev(E) [last unloaded: ppdev]
CPU: 1 PID: 785 Comm: rmmod Tainted: G        W   E  3.18.0-rc5-next-20141120+ #824
...
Call Trace:
...
 [<ffffffff810aff76>] warn_slowpath_fmt+0x46/0x50
 [<ffffffff8123d81b>] sysfs_remove_group+0x9b/0xa0
 [<ffffffff814c27e7>] dpm_sysfs_remove+0x57/0x60
 [<ffffffff814b6ac9>] device_del+0x49/0x240
 [<ffffffff814b6ce2>] device_unregister+0x22/0x70
 [<ffffffff814b6dac>] device_destroy+0x3c/0x50
 [<ffffffffc012209a>] pp_detach+0x4a/0x60 [ppdev]
 [<ffffffff814b32dd>] parport_remove_port+0x11d/0x150
 [<ffffffffc0137328>] parport_pc_unregister_port+0x28/0xf0 [parport_pc]
 [<ffffffffc0138c0e>] parport_pc_exit+0x76/0x468 [parport_pc]
 [<ffffffff81128dbc>] SyS_delete_module+0x18c/0x230

It is also easily reproducible on qemu with two dummy ports '-parallel
/dev/null -parallel /dev/null'.

So switch the order of killing the two structures. But since port is
freed by parport_pc_unregister_port, we have to remember port->dev
in a local variable.

Perhaps nothing worse than the warning happens thanks to the device
refcounting. We *should* be on the safe side.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Reviewed-by: Takashi Iwai <tiwai@suse.de>
Tested-by: Martin Pluskal <mpluskal@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-11-26 19:33:57 -08:00
Stephen Boyd
5b48e0605a spmi: Remove shutdown/suspend/resume kernel-doc
These members of the driver structure are not present.
Remove them from the kernel-doc.

Cc: Josh Cartwright <joshc@codeaurora.org>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-11-26 19:33:57 -08:00
Hans Verkuil
2180a0d41a carma-fpga-program: drop videobuf dependency
This driver abuses videobuf helper functions. This is a bad idea
because:

1) this driver is completely unrelated to media drivers
2) the videobuf API is deprecated and will be removed eventually

This patch replaces the videobuf functions with the normal DMA kernel
API.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-11-26 19:30:05 -08:00
Hans Verkuil
27361ff56d carma-fpga: drop videobuf dependency
This driver abuses videobuf helper functions. This is a bad idea
because:

1) this driver is completely unrelated to media drivers
2) the videobuf API is deprecated and will be removed eventually

This patch replaces the videobuf functions with the normal DMA kernel
API.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-11-26 19:30:05 -08:00
Hans Verkuil
e976a725e0 carma-fpga-program.c: fix compile errors
drivers/misc/carma/carma-fpga-program.c: In function 'fpga_program_dma':
drivers/misc/carma/carma-fpga-program.c:529:2: error: expected ';' before 'if'
  if (ret) {
  ^
drivers/misc/carma/carma-fpga-program.c: In function 'fpga_read':
drivers/misc/carma/carma-fpga-program.c:752:45: error: 'ppos' undeclared (first use in this function)
  return simple_read_from_buffer(buf, count, ppos,
                                             ^
drivers/misc/carma/carma-fpga-program.c:752:45: note: each undeclared identifier is reported only once for each function it appears in
drivers/misc/carma/carma-fpga-program.c: In function 'fpga_llseek':
drivers/misc/carma/carma-fpga-program.c:765:27: error: 'file' undeclared (first use in this function)
  return fixed_size_llseek(file, offset, origin, priv->fw_size);
                           ^
drivers/misc/carma/carma-fpga-program.c:759:9: warning: unused variable 'newpos' [-Wunused-variable]
  loff_t newpos;
         ^
drivers/misc/carma/carma-fpga-program.c: In function 'fpga_read':
drivers/misc/carma/carma-fpga-program.c:754:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^
drivers/misc/carma/carma-fpga-program.c: In function 'fpga_llseek':
drivers/misc/carma/carma-fpga-program.c:766:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^
scripts/Makefile.build:263: recipe for target 'drivers/misc/carma/carma-fpga-program.o' failed

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-11-26 19:30:05 -08:00
Pali Rohár
723493ca59 i8k: Fix temperature bug handling in i8k_get_temp()
Static array prev[] was incorrectly initialized. It should be initialized to
some "invalid" temperature value (above I8K_MAX_TEMP).

Next, function should store "invalid" value to prev[] (above I8K_MAX_TEMP),
not valid (= I8K_MAX_TEMP) because whole temperature bug handling will not
work.

And last part, to not break existing detection of temperature sensors, register
them also if i8k report too high temperature (above I8K_MAX_TEMP). This is
needed because some sensors are sometimes turned off (e.g sensor on GPU which
can be turned off/on) and in this case SMM report too high value.

To prevent reporting "invalid" values to userspace, return -EINVAL. In this case
sensors which are currently turned off (e.g optimus/powerexpress/enduro gpu)
are reported as "N/A" by lm-sensors package.

Signed-off-by: Pali Rohár <pali.rohar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-11-26 19:29:36 -08:00
Michael Neuling
ca4f8280ff cxl: Name interrupts in /proc/interrupt
Currently all interrupts generated by cxl are named "cxl".  This is not very
informative as we can't distinguish between cards, AFUs, error interrupts, user
contexts and user interrupts numbers.  Being able to distinguish them is useful
for setting affinity.

This patch gives each of these names in /proc/interrupts.

A two card CAPI system, with afu0.0 having 2 active contexts each with 4 user
IRQs each, will now look like this:

    % grep cxl /proc/interrupts
    444:          0  OPAL ICS 141312 Level     cxl-card1-err
    445:          0  OPAL ICS 141313 Level     cxl-afu1.0-err
    446:          0  OPAL ICS 141314 Level     cxl-afu1.0
    462:          0  OPAL ICS 2052 Level     cxl-afu0.0-pe0-1
    463:      75517  OPAL ICS 2053 Level     cxl-afu0.0-pe0-2
    468:          0  OPAL ICS 2054 Level     cxl-afu0.0-pe0-3
    469:          0  OPAL ICS 2055 Level     cxl-afu0.0-pe0-4
    470:          0  OPAL ICS 2056 Level     cxl-afu0.0-pe1-1
    471:      75506  OPAL ICS 2057 Level     cxl-afu0.0-pe1-2
    472:          0  OPAL ICS 2058 Level     cxl-afu0.0-pe1-3
    473:          0  OPAL ICS 2059 Level     cxl-afu0.0-pe1-4
    502:       1066  OPAL ICS 2050 Level     cxl-afu0.0
    514:          0  OPAL ICS 2048 Level     cxl-card0-err
    515:          0  OPAL ICS 2049 Level     cxl-afu0.0-err

Signed-off-by: Michael Neuling <mikey@neuling.org>
Signed-off-by: Ian Munsie <imunsie@au1.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-11-26 19:29:36 -08:00
Ian Munsie
27bbcef20a CXL: Return error to PSL if IRQ demultiplexing fails & print clearer warning
If an AFU has a hardware bug that causes it to acknowledge a context
terminate or remove while that context has outstanding transactions, it
is possible for the kernel to receive an interrupt for that context
after we have removed it from the context list.

The kernel will not be able to demultiplex the interrupt (or worse - if
we have already reallocated the process handle we could mis-attribute it
to the new context), and printed a big scary warning.

It did not acknowledge the interrupt, which would effectively halt
further translation fault processing on the PSL.

This patch makes the warning clearer about the likely cause of the issue
(i.e. hardware bug) to make it obvious to future AFU designers of what
needs to be fixed. It also prints out the process handle which can then
be matched up with hardware and software traces for debugging.

It also acknowledges the interrupt to the PSL with either an address
error or acknowledge, so that the PSL can continue with other
translations.

Signed-off-by: Ian Munsie <imunsie@au1.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-11-26 19:29:36 -08:00
Pankaj Dubey
ac610cd7c2 coresight-replicator: remove .owner field for driver
There is no need of .owner field for driver using
module_platform_driver.

Signed-off-by: Pankaj Dubey <pankaj.dubey@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-11-26 19:28:11 -08:00
Pankaj Dubey
8ee885a98e coresight: fixed comments in coresight.h
fixes following minor issues in code comments in coresight.h
- typo %s/enpoint/endpoint
- alignment of comment section for struct coresight_desc
- correction of comment for struct coresight_connection and
  struct coresight_device.

Signed-off-by: Pankaj Dubey <pankaj.dubey@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-11-26 19:28:11 -08:00
Pankaj Dubey
84b763d5b8 coresight: fix typo in comment in coresight-priv.h
fixes a typo %s/eveyone/everyone/ in function CS_UNLOCK.

Signed-off-by: Pankaj Dubey <pankaj.dubey@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-11-26 19:28:11 -08:00
Mathieu Poirier
799656de6f coresight: bindings for coresight drivers
Coresight IP blocks allow for the support of HW assisted tracing
on ARM SoCs.  Bindings for the currently available blocks are
presented herein.

Signed-off-by: Pratik Patel <pratikp@codeaurora.org>
Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-11-26 19:27:29 -08:00
Mathieu Poirier
7a25ec8e48 coresight: Adding ABI documentation
Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-11-26 19:27:28 -08:00
NeilBrown
4b7e4f8289 w1: support auto-load of w1_bq27000 module.
1/ change request_module call to zero-pad single digit
   family numbers.  This appears to be the intention of
   the code, but not what it actually does.

   This means that the alias created for W1_FAMILY_SMEM_01
   might actually be useful.

2/ Define a family name for the BQ27000 battery charge monitor.
   Unfortunately this is the same number as W1_FAMILY_SMEM_01
   so if both a compiled on a system, one module might need to
   be blacklisted.

3/ Add a MODULE_ALIAS for the bq27000.

Acked-by: Evgeniy Polyakov <zbr@ioremap.net>
Signed-off-by: NeilBrown <neilb@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-11-26 19:09:02 -08:00
David Fries
4b97b27939 w1: avoid potential u16 overflow
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Evgeniy Polyakov <zbr@ioremap.net>
Signed-off-by: David Fries <David@Fries.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-11-26 19:09:01 -08:00
David Fries
a30cfa475d cn: verify msg->len before making callback
The struct cn_msg len field comes from userspace and needs to be
validated.  More logical to do so here where the cn_msg pointer is
pulled out of the sk_buff than the callback which is passed cn_msg *
and might assume no validation is needed.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Evgeniy Polyakov <zbr@ioremap.net>
Signed-off-by: David Fries <David@Fries.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-11-26 19:09:01 -08:00
Tomas Winkler
55c4e6405d mei: export fw status registers through sysfs
The interface is for applications that monitor
the fw health.

We use device_create_with_groups interface
to register attribute with the mei class device

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-11-26 19:06:41 -08:00
Alexander Usyskin
edca5ea3ff mei: read and print all six FW status registers
ME devices prior to PCH8 (Lynx Point) have two FW status registers,
on PCH8 and newer excluding txe there are six FW status registers.

Signed-off-by: Alexander Usyskin <alexander.usyskin@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-11-26 19:06:41 -08:00
Tomas Winkler
e88281edd4 mei: txe: add cherrytrail device id
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-11-26 19:06:41 -08:00
Tomas Winkler
18caeb70f3 mei: kill cached host and me csr values
Kill host_hw_status and me_hw_state from me hw structure that used
to cache host and me csr values.
We do not use the cached values across the function calls anymore

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Alexander Usyskin <alexander.usyskin@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-11-26 19:06:41 -08:00
Thierry Reding
c380b862ba misc: Remove unused subdirectory
Commit 783c8f4c84 ("soc/tegra: Add efuse driver for Tegra") added a
fuse directory in drivers/misc along with a Makefile that were never
used. They were leftovers from an earlier version of the patch series.

Reported-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-11-26 19:06:41 -08:00
Dexuan Cui
f671223847 hv: hv_balloon: avoid memory leak on alloc_error of 2MB memory block
If num_ballooned is not 0, we shouldn't neglect the
already-partially-allocated 2MB memory block(s).

Signed-off-by: Dexuan Cui <decui@microsoft.com>
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Acked-by: Jason Wang <jasowang@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-11-26 19:03:04 -08:00
Dexuan Cui
4300f26492 tools: hv: ignore ENOBUFS and ENOMEM in the KVP daemon
Under high memory pressure and very high KVP R/W test pressure, the netlink
recvfrom() may transiently return ENOBUFS to the daemon -- we found this
during a 2-week stress test.

We'd better not terminate the daemon on the failure, because a typical KVP
user will re-try the R/W and hopefully it will succeed next time.

We can also ignore the errors on sending.

Cc: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Dexuan Cui <decui@microsoft.com>
Reviewed-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-11-26 19:01:12 -08:00
Vitaly Kuznetsov
9e5db05aae Tools: hv: vssdaemon: skip all filesystems mounted readonly
Instead of making a list of exceptions for readonly filesystems
in addition to iso9660 we already have it is better to skip freeze
operation for all readonly-mounted filesystems.

Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Acked-by: Dexuan Cui <decui@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-11-26 19:01:11 -08:00
Vitaly Kuznetsov
7a401744d5 Tools: hv: vssdaemon: report freeze errors
When ioctl(fd, FIFREEZE, 0) results in an error we cannot report it
to syslog instantly since that can cause write to a frozen disk.
However, the name of the filesystem which caused the error and errno
are valuable and we would like to get a nice human-readable message
in the log. Save errno before calling vss_operate(VSS_OP_THAW) and
report the error right after.

Unfortunately, FITHAW errors cannot be reported the same way as we
need to finish thawing all filesystems before calling syslog().

We should also avoid calling endmntent() for the second time in
case we encountered an error during freezing of '/' as it usually
results in SEGSEGV.

Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Acked-by: Dexuan Cui <decui@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-11-26 19:01:11 -08:00
Vitaly Kuznetsov
8d9560ebcc Drivers: hv: kvp,vss: Fast propagation of userspace communication failure
If we fail to send a message to userspace daemon with cn_netlink_send()
there is no need to wait for userspace to reply as it is not going to
happen. This happens when kvp or vss daemon is stopped after a successful
handshake. Report HV_E_FAIL immediately and cancel the timeout job so
host won't receive two failures.
Use pr_warn() for VSS and pr_debug() for KVP deliberately as VSS request
are rare and result in a failed backup. KVP requests are much more frequent
after a successful handshake so avoid flooding logs. It would be nice to
have an ability to de-negotiate with the host in case userspace daemon gets
disconnected so we won't receive new requests. But I'm not sure it is
possible.

Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-11-26 19:00:32 -08:00
Vitaly Kuznetsov
649142074d Drivers: hv: vss: Introduce timeout for communication with userspace
In contrast with KVP there is no timeout when communicating with
userspace VSS daemon. In case it gets stuck performing freeze/thaw
operation no message will be sent to the host so it will take very
long (around 10 minutes) before backup fails. Introduce 10 second
timeout using schedule_delayed_work().

Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-11-26 19:00:32 -08:00
Greg Kroah-Hartman
1a3c724afd Update extcon for v3.19
This patchset fix minor issue of extcon driver.
 
 Detailed description for patchset:
 - Fix typo and change jig cable name of extcon-max77693.c
 - Update the extcon_get_edev_by_phandle() because previous extcon_get_edev_by_phandle()
   considered the platform device driver. So, this modification supports
   OF-based extcon lookup method by using the list of extcon devices.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.11 (GNU/Linux)
 
 iQIcBAABAgAGBQJUcxzfAAoJEJzN3yze689T5KoQAI709jZXredSvSGtUK6qQHKO
 +dh9rp9amIpTu+JASoCV//22XkLlOb/6dBg0bPYCSQ1KmO6k+AQSo4DXXayt713w
 Fx0f0th64/DmukO7gOXwWXh7+eAfXommUnJPtH7kZj44ZmEJyL7rS87Q/gg6jaua
 y4CLw6WvIupNiRHYS8umKM/Oj3z7WhxfMXnkE832uubiIK0ZhrlmMGcg4r410D+V
 FrQRmmtFrsZj+x5tnUMekX7BksYDnY/KBfmhY+OApRwveTjVrv77os1kcYKBEouD
 IgxKE6DCBiBq8a6rQv8UUJTA6H1DqGFjRAbypiVHxzRZhGZve33EYd8LUP/HHQgS
 JE86ufiJ8KEYrvq9B5zb9RSi2JHK4l/kr6AIiuoOsDjINVX5mnjelUY1Xhdog/DJ
 cLS2o7khFfz80/aMDs7n+k6kor+VLexAQuAsRotLXo8ppmItGKm5xellh04dFW6y
 evTsGyicwK3Vo/LNKzTvMKVOsyUI6Ky+B18vTcc+6KzwS5qBM3Pz9lzqGfqNyw0B
 fVeLBDS0SIby0DYlvrAJ1fs32/BnhaDT0SbPUH1HUJxlVk5GprzAC5vCfG7CjAwR
 jN9na8gg3nZp+8L/GmWDPt0ESQSg2x5BsacXFzVdhUTU16Fc+0S4PxkJ//w3TF6x
 ljUtHjUC90QeHX412l+P
 =k6tk
 -----END PGP SIGNATURE-----

Merge tag 'extcon-next-for-3.19' of git://git.kernel.org/pub/scm/linux/kernel/git/chanwoo/extcon into char-misc-testing

Update extcon for v3.19

This patchset fix minor issue of extcon driver.

Detailed description for patchset:
- Fix typo and change jig cable name of extcon-max77693.c
- Update the extcon_get_edev_by_phandle() because previous extcon_get_edev_by_phandle()
  considered the platform device driver. So, this modification supports
  OF-based extcon lookup method by using the list of extcon devices.
2014-11-24 17:12:31 -08:00
Krzysztof Kozlowski
6ab0b1171b extcon: max14577: Fix obvious typo in company name in copyright
Fix a typo in name of company in copyright comment.

Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
2014-11-24 20:51:15 +09:00
Krzysztof Kozlowski
c22159a2d5 extcon: max77693: Fix cable name of JIG_UART_ON
When JIG was set to "boot on" mode, the UART connection did not work
because it was assigned to Dock-Car cable (path: audio), not JIG-UART-ON
cable.

This was introduced in 39bf369e4e ("extcon: max77693: Add support dock
device and buttons") while adding dock features.

Assign the JIG-UART-ON back to UART path.

Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
[cw00.choi: Modify the patch name to remove specific board name]
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
2014-11-24 20:51:15 +09:00
Tomasz Figa
f841afb174 extcon: Implement OF-based extcon lookup properly
Platform bus is not the only way to have extcon devices, so current
implementation of of_extcon_get_extcon_dev() is broken. Also using
parent device node only to get device name is quite ugly.

This patch reimplements of_extcon_get_extcon_dev() to do exactly the
same as extcon_get_extcon_dev() but instead of comparing names, compare
node pointers.

Signed-off-by: Tomasz Figa <tomasz.figa@gmail.com>
[mszyprow: simplified the code]
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
2014-11-24 20:51:15 +09:00
Greg Kroah-Hartman
e88b1fc6a1 Revert "misc: always assign miscdevice to file->private_data in open()"
This reverts commit 32eca22180.

Changing core kernel code to operate in a different manner, without a
build-time breakage is tough to do and ensure you got it right.  There
are lots of problems popping up due to this change, so let's revert it
for now as it is not safe to merge to the tree at this point in time.

Cc: Martin Kepplinger <martink@posteo.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-11-14 16:49:49 -08:00
Greg Kroah-Hartman
4bc33a2cd5 Revert "fbdev: pxa3xx-gcu: remove redundant implementation of open()"
This reverts commit 2bfeeca107.

Not needed after the next patch is applied.

Cc: Martin Kepplinger <martink@posteo.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-11-14 16:49:41 -08:00
Greg Kroah-Hartman
1b6f47537c Revert "char: misc: document behaviour of open()"
This reverts commit 965ab29ba0.

This is causing way more problems than it is worth.

Cc: Martin Kepplinger <martink@posteo.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-11-14 16:48:56 -08:00
Valentin Rothberg
cc641d5529 checkkconfigsymbols.py: improve detection of defects
This patch improves the detection of defects by updating the
regular expression to find Kconfig identifiers in the source
code, and fixes some cases of false positives. The following
changes are made:
- improve regex to find Kconfig identifiers in the source
- exclude .log files from analysis
- improve filtering of false positives (e.g, CONFIG_XXX)
- change output format from (feature:\tlist) to (feature\tlist)

Signed-off-by: Valentin Rothberg <valentinrothberg@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-11-08 20:50:43 -08:00
Mathieu Poirier
184901a06a ARM: removing support for etb/etm in "arch/arm/kernel/"
Removing minimal support for etb/etm to favour an implementation
that is more flexible, extensible and capable of handling more
platforms.

Also removing the only client of the old driver.  That code can
easily be replaced by entries for etb/etm in the device tree.

Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-11-07 15:19:33 -08:00
Xia Kaixu
4d5616ca59 coresight: adding basic support for D01 board
Support for 16 PTMs, funnel, TPIU and replicator connected
to the ETB are included.

Signed-off-by: Xia Kaixu <kaixu.xia@linaro.org>
Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-11-07 15:19:33 -08:00
Mathieu Poirier
0bec8d82bd coresight: adding basic support for Vexpress TC2
Support for the 2 PTMs, 3 ETMs, funnel, TPIU and replicator
connected to the ETB are included.  Proper handling of the
ITM and the replicator linked to it along with the CTIs
and SWO are not included.

Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-11-07 15:19:33 -08:00
Mathieu Poirier
9d31620268 coresight: adding support for beagle and beagleXM
Currently supporting ETM and ETB.  Support for TPIU
and SDTI are yet to be added.

Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-11-07 15:19:33 -08:00
Mathieu Poirier
872234d3fb coresight: documentation for coresight framework and drivers
Documentation containing an explanation on what the framework
provides and the drivers working with it.  A minimal example
on how to use the functionality is also provided.

Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-11-07 15:19:33 -08:00
Pratik Patel
a939fc5a71 coresight-etm: add CoreSight ETM/PTM driver
This driver manages CoreSight ETM (Embedded Trace Macrocell) that
supports processor tracing. Currently supported version are ARM
ETMv3.x and PTM1.x.

Signed-off-by: Pratik Patel <pratikp@codeaurora.org>
Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>

coresight-etm3x: adding missing error checking
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-11-07 15:19:33 -08:00
Pratik Patel
ceacc1d9b7 coresight-replicator: add CoreSight Replicator driver
This driver manages non-configurable CoreSight Replicator that
takes a single input trace data stream and replicates it to
produce two identical trace data output streams. Replicators
are typically used to route single interleaved trace data
stream to two or more sinks.

Signed-off-by: Pratik Patel <pratikp@codeaurora.org>
Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-11-07 15:19:33 -08:00
Pratik Patel
6e21e34515 coresight-funnel: add CoreSight Funnel driver
This driver manages CoreSight Funnel which acts as a link.
Funnels have multiple input ports (typically 8) each of which
represents an input trace data stream. These multiple input trace
data streams are interleaved into a single output stream coming
out of the Funnel.

Signed-off-by: Pratik Patel <pratikp@codeaurora.org>
Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-11-07 15:19:33 -08:00
Pratik Patel
fdfc0d8a06 coresight-etb: add CoreSight ETB driver
This driver manages CoreSight ETB (Embedded Trace Buffer) which
acts as a circular buffer sink collecting generated trace data.

Signed-off-by: Pratik Patel <pratikp@codeaurora.org>
Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-11-07 15:19:32 -08:00
Pratik Patel
dc161b9f01 coresight-tpiu: add CoreSight TPIU driver
This driver manages CoreSight TPIU (Trace Port Interface Unit)
which acts as a sink. TPIU is typically connected to some offchip
hardware hosting a storage buffer.

Signed-off-by: Pratik Patel <pratikp@codeaurora.org>
Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-11-07 15:19:32 -08:00
Pratik Patel
bc4bf7fe98 coresight-tmc: add CoreSight TMC driver
This driver manages CoreSight TMC (Trace Memory Controller) which
can act as a link or a sink depending upon its configuration. It
can present itself as an ETF (Embedded Trace FIFO) or ETR
(Embedded Trace Router).

ETF when configured in circular buffer mode acts as a trace
collection sink. When configured in HW fifo mode it acts as link.
ETR always acts as a sink and can be used to route data to memory
allocated in RAM.

Signed-off-by: Pratik Patel <pratikp@codeaurora.org>
Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-11-07 15:19:32 -08:00
Pratik Patel
a06ae8609b coresight: add CoreSight core layer framework
CoreSight components are compliant with the ARM CoreSight
architecture specification and can be connected in various
topologies to suit a particular SoC tracing needs. These trace
components can generally be classified as sources, links and
sinks. Trace data produced by one or more sources flows through
the intermediate links connecting the source to the currently
selected sink.

The CoreSight framework provides an interface for the CoreSight trace
drivers to register themselves with. It's intended to build up a
topological view of the CoreSight components and configure the
correct serie of components on user input via sysfs.

For eg., when enabling a source, the framework builds up a path
consisting of all the components connecting the source to the
currently selected sink(s) and enables all of them.

The framework also supports switching between available sinks
and provides status information to user space applications
through the debugfs interface.

Signed-off-by: Pratik Patel <pratikp@codeaurora.org>
Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-11-07 15:19:32 -08:00
Greg Kroah-Hartman
f4c9485f9f Revert "driver core: Fix unbalanced device reference in drivers_probe"
This reverts commit bb34cb6bbd.

Wrong patch for the wrong branch, sorry for the noise...

Cc: Alex Williamson <alex.williamson@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-11-07 11:26:15 -08:00
Dmitry Eremin-Solenikov
4bc9ef297e pcmcia: sa1111: pass sa1111_dev to jornada720 code
All other sa1111 platforms pass sa1111_dev instance to platform-specific
code. Follow this approach for Jornada720 platform code.

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-11-07 11:24:01 -08:00
Dmitry Eremin-Solenikov
cfd1f008c4 pcmcia: sa1111: pass sa1111_dev to badge4-specific code
Pass sa1111_dev to platform-specific init code, as it is done by lubbock
and neponset. This removes a compilation warnings:

drivers/pcmcia/sa1111_badge4.c: In function 'pcmcia_badge4_init':
drivers/pcmcia/sa1111_badge4.c:147:5: warning: passing argument 1 of 'sa1111_pcmcia_add' from incompatible pointer type [enabled by default]
In file included from drivers/pcmcia/sa1111_badge4.c:26:0:
drivers/pcmcia/sa1111_generic.h:15:5: note: expected 'struct sa1111_dev *' but argument is of type 'struct device *'

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-11-07 11:24:01 -08:00