lening bieden nu aanvragen

2017-09-10 Thread Scotwest Credit Union Limited


Groet u

GELD BESCHIKBAAR OM TE LENEN. Krijg het geld / de lening die u nodig heeft bij 
Scotwest Credit Union Limited. Wij zijn particuliere kredietverstrekkers en 
investeerders en bieden zowel persoonlijke lening, startlening, educatief / 
agrarisch lening, onroerend goed / bouwlening, vastgoedlening, schuldvrije 
leningen, mobil home loan, hard money lening, beveiligde / ongedekte lening, 
investeringsfinanciering, uitbreiding lening, Jv kapitaal / Rehab leningen, 
Equity / herfinanciering leningen, enz. aan genteresseerde personen uit 
elk land. Wij bieden lening aan personen zowel nationaal als internationaal 
tegen een lage rente van 3%. Bent u door banken of andere kredietverstrekkers 
afgewezen, is Scotwest Credit Union Limited hier om u te helpen uw doel te 
archiveren. Als u een lening van elk type nodig hebt, neem dan contact met ons 
op via onderstaande e-mailadres en wij staan hier om u te helpen wat u nodig 
heeft: scot.wes...@gmail.com



Uw volledige namen:

Adres:

Telefoonnummer:

Benodigd leningbedrag:

Looptijd:

Bezetting:

Maandelijks Inkomen Niveau:

Geslacht:

Geboortedatum:

Staat:

land:

Postcode:

Doel:

Zodra u deze informatie verstrekt, kunnen wij u voorzien van de terugbetaling 
van de lening op basis van maandelijkse kosten

Wij wachten op uw snelle reactie.

Dank je.

De heer R. Ashley
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH v2 1/5] staging: typec: tcpm: Drop commented out code

2017-09-10 Thread Guenter Roeck
Commented out code can be added as needed. Drop it.
Also drop TODO and an obsolete XXX comment.

Signed-off-by: Guenter Roeck 
---
v2: No change

 drivers/staging/typec/tcpm.c | 37 +
 1 file changed, 1 insertion(+), 36 deletions(-)

diff --git a/drivers/staging/typec/tcpm.c b/drivers/staging/typec/tcpm.c
index 8af62e74d54c..cb25ec8334b0 100644
--- a/drivers/staging/typec/tcpm.c
+++ b/drivers/staging/typec/tcpm.c
@@ -908,27 +908,6 @@ static void svdm_consume_identity(struct tcpm_port *port, 
const __le32 *payload,
 
memset(>mode_data, 0, sizeof(port->mode_data));
 
-#if 0 /* Not really a match */
-   switch (PD_IDH_PTYPE(vdo)) {
-   case IDH_PTYPE_UNDEF:
-   port->partner.type = TYPEC_PARTNER_NONE; /* no longer exists */
-   break;
-   case IDH_PTYPE_HUB:
-   break;
-   case IDH_PTYPE_PERIPH:
-   break;
-   case IDH_PTYPE_PCABLE:
-   break;
-   case IDH_PTYPE_ACABLE:
-   break;
-   case IDH_PTYPE_AMA:
-   port->partner.type = TYPEC_PARTNER_ALTMODE;
-   break;
-   default:
-   break;
-   }
-#endif
-
port->partner_ident.id_header = vdo;
port->partner_ident.cert_stat = le32_to_cpu(payload[VDO_INDEX_CSTAT]);
port->partner_ident.product = product;
@@ -1103,11 +1082,7 @@ static int tcpm_pd_svdm(struct tcpm_port *port, const 
__le32 *payload, int cnt,
response[0] = VDO(svid, 1, CMD_DISCOVER_MODES);
rlen = 1;
} else {
-#if 0
-   response[0] = pd_dfp_enter_mode(port, 0, 0);
-   if (response[0])
-   rlen = 1;
-#endif
+   /* enter alternate mode if/when implemented */
}
break;
case CMD_ENTER_MODE:
@@ -1145,10 +1120,6 @@ static void tcpm_handle_vdm_request(struct tcpm_port 
*port,
 
if (PD_VDO_SVDM(p0))
rlen = tcpm_pd_svdm(port, payload, cnt, response);
-#if 0
-   else
-   rlen = tcpm_pd_custom_vdm(port, cnt, payload, response);
-#endif
 
if (rlen > 0) {
tcpm_queue_vdm(port, response[0], [1], rlen - 1);
@@ -2442,7 +2413,6 @@ static void run_state_machine(struct tcpm_port *port)
tcpm_set_state(port, SNK_STARTUP, 0);
break;
case SNK_STARTUP:
-   /* XXX: callback into infrastructure */
opmode =  tcpm_get_pwr_opmode(port->polarity ?
  port->cc2 : port->cc1);
typec_set_pwr_opmode(port->typec_port, opmode);
@@ -3589,11 +3559,6 @@ struct tcpm_port *tcpm_register_port(struct device *dev, 
struct tcpc_dev *tcpc)
 
port->partner_desc.identity = >partner_ident;
port->port_type = tcpc->config->type;
-   /*
-* TODO:
-*  - alt_modes, set_alt_mode
-*  - {debug,audio}_accessory
-*/
 
port->typec_port = typec_register_port(port->dev, >typec_caps);
if (!port->typec_port) {
-- 
2.7.4

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH v2 2/5] staging: typec: tcpm: Document data structures

2017-09-10 Thread Guenter Roeck
Document struct tcpc_config and struct tcpc_dev.
Drop unused TCPC_USB_SWITCH_RESTORE.

Signed-off-by: Guenter Roeck 
---
v2: No change

 drivers/staging/typec/tcpm.h | 57 ++--
 1 file changed, 50 insertions(+), 7 deletions(-)

diff --git a/drivers/staging/typec/tcpm.h b/drivers/staging/typec/tcpm.h
index 7e9a6b7b5cd6..073197f0d2bb 100644
--- a/drivers/staging/typec/tcpm.h
+++ b/drivers/staging/typec/tcpm.h
@@ -54,6 +54,27 @@ enum tcpm_transmit_type {
TCPC_TX_BIST_MODE_2 = 7
 };
 
+/**
+ * struct tcpc_config - Port configuration
+ * @src_pdo:   PDO parameters sent to port partner as response to
+ * PD_CTRL_GET_SOURCE_CAP message
+ * @nr_src_pdo:Number of entries in @src_pdo
+ * @snk_pdo:   PDO parameters sent to partner as response to
+ * PD_CTRL_GET_SINK_CAP message
+ * @nr_snk_pdo:Number of entries in @snk_pdo
+ * @max_snk_mv:Maximum acceptable sink voltage in mV
+ * @max_snk_ma:Maximum sink current in mA
+ * @max_snk_mw:Maximum required sink power in mW
+ * @operating_snk_mw:
+ * Required operating sink power in mW
+ * @type:  Port type (TYPEC_PORT_DFP, TYPEC_PORT_UFP, or
+ * TYPEC_PORT_DRP)
+ * @default_role:
+ * Default port role (TYPEC_SINK or TYPEC_SOURCE).
+ * Set to TYPEC_NO_PREFERRED_ROLE if no default role.
+ * @try_role_hw:True if try.{Src,Snk} is implemented in hardware
+ * @alt_modes: List of supported alternate modes
+ */
 struct tcpc_config {
const u32 *src_pdo;
unsigned int nr_src_pdo;
@@ -79,7 +100,6 @@ struct tcpc_config {
 enum tcpc_usb_switch {
TCPC_USB_SWITCH_CONNECT,
TCPC_USB_SWITCH_DISCONNECT,
-   TCPC_USB_SWITCH_RESTORE,/* TODO FIXME */
 };
 
 /* Mux state attributes */
@@ -104,17 +124,40 @@ struct tcpc_mux_dev {
void *priv_data;
 };
 
+/**
+ * struct tcpc_dev - Port configuration and callback functions
+ * @config:Pointer to port configuration
+ * @get_vbus:  Called to read current VBUS state
+ * @get_current_limit:
+ * Optional; called by the tcpm core when configured as a snk
+ * and cc=Rp-def. This allows the tcpm to provide a fallback
+ * current-limit detection method for the cc=Rp-def case.
+ * For example, some tcpcs may include BC1.2 charger detection
+ * and use that in this case.
+ * @set_cc:Called to set value of CC pins
+ * @get_cc:Called to read current CC pin values
+ * @set_polarity:
+ * Called to set polarity
+ * @set_vconn: Called to enable or disable VCONN
+ * @set_vbus:  Called to enable or disable VBUS
+ * @set_current_limit:
+ * Optional; called to set current limit as negotiated
+ * with partner.
+ * @set_pd_rx: Called to enable or disable reception of PD messages
+ * @set_roles: Called to set power and data roles
+ * @start_drp_toggling:
+ * Optional; if supported by hardware, called to start DRP
+ * toggling. DRP toggling is stopped automatically if
+ * a connection is established.
+ * @try_role:  Optional; called to set a preferred role
+ * @pd_transmit:Called to transmit PD message
+ * @mux:   Pointer to multiplexer data
+ */
 struct tcpc_dev {
const struct tcpc_config *config;
 
int (*init)(struct tcpc_dev *dev);
int (*get_vbus)(struct tcpc_dev *dev);
-   /*
-* This optional callback gets called by the tcpm core when configured
-* as a snk and cc=Rp-def. This allows the tcpm to provide a fallback
-* current-limit detection method for the cc=Rp-def case. E.g. some
-* tcpcs may include BC1.2 charger detection and use that in this case.
-*/
int (*get_current_limit)(struct tcpc_dev *dev);
int (*set_cc)(struct tcpc_dev *dev, enum typec_cc_status cc);
int (*get_cc)(struct tcpc_dev *dev, enum typec_cc_status *cc1,
-- 
2.7.4

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH v2 5/5] usb: typec: fusb302: Move out of staging

2017-09-10 Thread Guenter Roeck
The driver is in good enough shape to be moved out of staging.
Do it.

Signed-off-by: Guenter Roeck 
---
v2: Use format-patch -M

 drivers/staging/typec/Kconfig|  2 --
 drivers/staging/typec/Makefile   |  1 -
 drivers/staging/typec/fusb302/TODO   | 10 --
 drivers/usb/typec/Kconfig|  6 ++
 drivers/usb/typec/Makefile   |  1 +
 drivers/{staging => usb}/typec/fusb302/Kconfig   |  0
 drivers/{staging => usb}/typec/fusb302/Makefile  |  0
 drivers/{staging => usb}/typec/fusb302/fusb302.c |  0
 drivers/{staging => usb}/typec/fusb302/fusb302_reg.h |  0
 9 files changed, 7 insertions(+), 13 deletions(-)
 delete mode 100644 drivers/staging/typec/fusb302/TODO
 rename drivers/{staging => usb}/typec/fusb302/Kconfig (100%)
 rename drivers/{staging => usb}/typec/fusb302/Makefile (100%)
 rename drivers/{staging => usb}/typec/fusb302/fusb302.c (100%)
 rename drivers/{staging => usb}/typec/fusb302/fusb302_reg.h (100%)

diff --git a/drivers/staging/typec/Kconfig b/drivers/staging/typec/Kconfig
index 31fad23c2553..5359f556d203 100644
--- a/drivers/staging/typec/Kconfig
+++ b/drivers/staging/typec/Kconfig
@@ -9,8 +9,6 @@ config TYPEC_TCPCI
help
  Type-C Port Controller driver for TCPCI-compliant controller.
 
-source "drivers/staging/typec/fusb302/Kconfig"
-
 endif
 
 endmenu
diff --git a/drivers/staging/typec/Makefile b/drivers/staging/typec/Makefile
index e1df3f0fde10..53d649abcb53 100644
--- a/drivers/staging/typec/Makefile
+++ b/drivers/staging/typec/Makefile
@@ -1,2 +1 @@
 obj-$(CONFIG_TYPEC_TCPCI)  += tcpci.o
-obj-y  += fusb302/
diff --git a/drivers/staging/typec/fusb302/TODO 
b/drivers/staging/typec/fusb302/TODO
deleted file mode 100644
index 19b466eb585d..
--- a/drivers/staging/typec/fusb302/TODO
+++ /dev/null
@@ -1,10 +0,0 @@
-fusb302:
-- Find a better logging scheme, at least not having the same debugging/logging
-  code replicated here and in tcpm
-- Find a non-hacky way to coordinate between PM and I2C access
-- Documentation? The FUSB302 datasheet provides information on the chip to help
-  understand the code. But it may still be helpful to have a documentation.
-- We may want to replace the  "fcs,max-snk-microvolt", "fcs,max-snk-microamp",
-  "fcs,max-snk-microwatt" and "fcs,operating-snk-microwatt" device(tree)
-  properties with properties which are part of a generic type-c controller
-  devicetree binding.
diff --git a/drivers/usb/typec/Kconfig b/drivers/usb/typec/Kconfig
index 888605860091..819c0ed2b200 100644
--- a/drivers/usb/typec/Kconfig
+++ b/drivers/usb/typec/Kconfig
@@ -12,6 +12,12 @@ config TYPEC_TCPM
  The Type-C Port Controller Manager provides a USB PD and USB Type-C
  state machine for use with Type-C Port Controllers.
 
+if TYPEC_TCPM
+
+source "drivers/usb/typec/fusb302/Kconfig"
+
+endif
+
 config TYPEC_WCOVE
tristate "Intel WhiskeyCove PMIC USB Type-C PHY driver"
depends on ACPI
diff --git a/drivers/usb/typec/Makefile b/drivers/usb/typec/Makefile
index eb883984724b..b77688ce1f16 100644
--- a/drivers/usb/typec/Makefile
+++ b/drivers/usb/typec/Makefile
@@ -1,4 +1,5 @@
 obj-$(CONFIG_TYPEC)+= typec.o
 obj-$(CONFIG_TYPEC_TCPM)   += tcpm.o
+obj-y  += fusb302/
 obj-$(CONFIG_TYPEC_WCOVE)  += typec_wcove.o
 obj-$(CONFIG_TYPEC_UCSI)   += ucsi/
diff --git a/drivers/staging/typec/fusb302/Kconfig 
b/drivers/usb/typec/fusb302/Kconfig
similarity index 100%
rename from drivers/staging/typec/fusb302/Kconfig
rename to drivers/usb/typec/fusb302/Kconfig
diff --git a/drivers/staging/typec/fusb302/Makefile 
b/drivers/usb/typec/fusb302/Makefile
similarity index 100%
rename from drivers/staging/typec/fusb302/Makefile
rename to drivers/usb/typec/fusb302/Makefile
diff --git a/drivers/staging/typec/fusb302/fusb302.c 
b/drivers/usb/typec/fusb302/fusb302.c
similarity index 100%
rename from drivers/staging/typec/fusb302/fusb302.c
rename to drivers/usb/typec/fusb302/fusb302.c
diff --git a/drivers/staging/typec/fusb302/fusb302_reg.h 
b/drivers/usb/typec/fusb302/fusb302_reg.h
similarity index 100%
rename from drivers/staging/typec/fusb302/fusb302_reg.h
rename to drivers/usb/typec/fusb302/fusb302_reg.h
-- 
2.7.4

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH v2 4/5] typec: tcpm: Move out of staging

2017-09-10 Thread Guenter Roeck
Move tcpm (USB Type-C Port Manager) out of staging.

Signed-off-by: Guenter Roeck 
---
v2: Use format-patch -M

 drivers/staging/typec/Kconfig |  8 
 drivers/staging/typec/Makefile|  1 -
 drivers/staging/typec/TODO| 10 --
 drivers/staging/typec/fusb302/fusb302.c   |  4 ++--
 drivers/staging/typec/tcpci.c |  4 ++--
 drivers/usb/typec/Kconfig |  8 
 drivers/usb/typec/Makefile|  1 +
 drivers/{staging => usb}/typec/tcpm.c |  9 -
 {drivers/staging/typec => include/linux/usb}/pd.h |  0
 {drivers/staging/typec => include/linux/usb}/pd_bdo.h |  0
 {drivers/staging/typec => include/linux/usb}/pd_vdo.h |  0
 {drivers/staging/typec => include/linux/usb}/tcpm.h   |  0
 12 files changed, 17 insertions(+), 28 deletions(-)
 rename drivers/{staging => usb}/typec/tcpm.c (99%)
 rename {drivers/staging/typec => include/linux/usb}/pd.h (100%)
 rename {drivers/staging/typec => include/linux/usb}/pd_bdo.h (100%)
 rename {drivers/staging/typec => include/linux/usb}/pd_vdo.h (100%)
 rename {drivers/staging/typec => include/linux/usb}/tcpm.h (100%)

diff --git a/drivers/staging/typec/Kconfig b/drivers/staging/typec/Kconfig
index 37a0781b0d0c..31fad23c2553 100644
--- a/drivers/staging/typec/Kconfig
+++ b/drivers/staging/typec/Kconfig
@@ -1,13 +1,5 @@
 menu "USB Power Delivery and Type-C drivers"
 
-config TYPEC_TCPM
-   tristate "USB Type-C Port Controller Manager"
-   depends on USB
-   select TYPEC
-   help
- The Type-C Port Controller Manager provides a USB PD and USB Type-C
- state machine for use with Type-C Port Controllers.
-
 if TYPEC_TCPM
 
 config TYPEC_TCPCI
diff --git a/drivers/staging/typec/Makefile b/drivers/staging/typec/Makefile
index 30a7e29cbc9e..e1df3f0fde10 100644
--- a/drivers/staging/typec/Makefile
+++ b/drivers/staging/typec/Makefile
@@ -1,3 +1,2 @@
-obj-$(CONFIG_TYPEC_TCPM)   += tcpm.o
 obj-$(CONFIG_TYPEC_TCPCI)  += tcpci.o
 obj-y  += fusb302/
diff --git a/drivers/staging/typec/TODO b/drivers/staging/typec/TODO
index bc1f97a2d1bf..53fe2f726c88 100644
--- a/drivers/staging/typec/TODO
+++ b/drivers/staging/typec/TODO
@@ -1,13 +1,3 @@
-tcpm:
-- Add documentation (at the very least for the API to low level drivers)
-- Split PD code into separate file
-- Check if it makes sense to use tracepoints instead of debugfs for debug logs
-- Implement Alternate Mode handling
-- Address "#if 0" code if not addressed with the above
-- Validate all comments marked with "XXX"; either address or remove comments
-- Add support for USB PD 3.0. While not mandatory, at least fast role swap
-  as well as authentication support would be very desirable.
-
 tcpci:
 - Test with real hardware
 
diff --git a/drivers/staging/typec/fusb302/fusb302.c 
b/drivers/staging/typec/fusb302/fusb302.c
index fc6a3cf74eb3..e790b67d4953 100644
--- a/drivers/staging/typec/fusb302/fusb302.c
+++ b/drivers/staging/typec/fusb302/fusb302.c
@@ -37,11 +37,11 @@
 #include 
 #include 
 #include 
+#include 
+#include 
 #include 
 
 #include "fusb302_reg.h"
-#include "../tcpm.h"
-#include "../pd.h"
 
 /*
  * When the device is SNK, BC_LVL interrupt is used to monitor cc pins
diff --git a/drivers/staging/typec/tcpci.c b/drivers/staging/typec/tcpci.c
index df72d8b01e73..4636804ea1a4 100644
--- a/drivers/staging/typec/tcpci.c
+++ b/drivers/staging/typec/tcpci.c
@@ -20,11 +20,11 @@
 #include 
 #include 
 #include 
+#include 
+#include 
 #include 
 
-#include "pd.h"
 #include "tcpci.h"
-#include "tcpm.h"
 
 #define PD_RETRY_COUNT 3
 
diff --git a/drivers/usb/typec/Kconfig b/drivers/usb/typec/Kconfig
index bc1b7745f1d4..888605860091 100644
--- a/drivers/usb/typec/Kconfig
+++ b/drivers/usb/typec/Kconfig
@@ -4,6 +4,14 @@ menu "USB Power Delivery and Type-C drivers"
 config TYPEC
tristate
 
+config TYPEC_TCPM
+   tristate "USB Type-C Port Controller Manager"
+   depends on USB
+   select TYPEC
+   help
+ The Type-C Port Controller Manager provides a USB PD and USB Type-C
+ state machine for use with Type-C Port Controllers.
+
 config TYPEC_WCOVE
tristate "Intel WhiskeyCove PMIC USB Type-C PHY driver"
depends on ACPI
diff --git a/drivers/usb/typec/Makefile b/drivers/usb/typec/Makefile
index bc214f15f1b5..eb883984724b 100644
--- a/drivers/usb/typec/Makefile
+++ b/drivers/usb/typec/Makefile
@@ -1,3 +1,4 @@
 obj-$(CONFIG_TYPEC)+= typec.o
+obj-$(CONFIG_TYPEC_TCPM)   += tcpm.o
 obj-$(CONFIG_TYPEC_WCOVE)  += typec_wcove.o
 obj-$(CONFIG_TYPEC_UCSI)   += ucsi/
diff --git a/drivers/staging/typec/tcpm.c b/drivers/usb/typec/tcpm.c
similarity index 99%
rename from drivers/staging/typec/tcpm.c
rename to drivers/usb/typec/tcpm.c
index cb25ec8334b0..f557c479fdc2 100644
--- a/drivers/staging/typec/tcpm.c
+++ 

[PATCH v2 3/5] staging: typec: pd: Document struct pd_message

2017-09-10 Thread Guenter Roeck
struct pd_message is the format of a PD message as seen on the wire.

Signed-off-by: Guenter Roeck 
---
v2: No change

 drivers/staging/typec/pd.h | 5 +
 1 file changed, 5 insertions(+)

diff --git a/drivers/staging/typec/pd.h b/drivers/staging/typec/pd.h
index 30b32ad72acd..42a10883a2cb 100644
--- a/drivers/staging/typec/pd.h
+++ b/drivers/staging/typec/pd.h
@@ -104,6 +104,11 @@ static inline unsigned int pd_header_msgid_le(__le16 
header)
 
 #define PD_MAX_PAYLOAD 7
 
+/*
+ * struct pd_message - PD message as seen on wire
+ * @header:PD message header
+ * @payload:   PD message payload
+ */
 struct pd_message {
__le16 header;
__le32 payload[PD_MAX_PAYLOAD];
-- 
2.7.4

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v2 08/11] staging: typec: tcpm: Set mux to device mode when configured as such

2017-09-10 Thread Guenter Roeck

On 09/05/2017 09:42 AM, Hans de Goede wrote:

Setting the mux to TYPEC_MUX_NONE, TCPC_USB_SWITCH_DISCONNECT when the
data-role is device is not correct. Plenty of devices support operating
as USB device through a (separate) USB device controller.

So this commit instead splits out TYPEC_MUX_USB into TYPEC_MUX_USB_HOST
and TYPEC_MUX_USB_DEVICE and makes tcpm_set_roles() set the mux
accordingly.

Likewise TCPC_MUX_DP gets renamed to TCPC_MUX_DP_SRC to make clear that
this is for configuring the Type-C port as a Display Port source, not a
sink.

Last this commit makes tcpm_reset_port() to set the mux to
TYPEC_MUX_NONE, TCPC_USB_SWITCH_DISCONNECT so that it does not and up
staying in host (and with this commit also device) mode after a detach.


This sentence is hard to understand.


Signed-off-by: Hans de Goede 


Otherwise

Reviewed-by: Guenter Roeck 


---
  drivers/staging/typec/tcpm.c |  7 ---
  drivers/staging/typec/tcpm.h | 22 ++
  2 files changed, 18 insertions(+), 11 deletions(-)

diff --git a/drivers/staging/typec/tcpm.c b/drivers/staging/typec/tcpm.c
index 8af62e74d54c..ffe7e26d4ed3 100644
--- a/drivers/staging/typec/tcpm.c
+++ b/drivers/staging/typec/tcpm.c
@@ -752,11 +752,11 @@ static int tcpm_set_roles(struct tcpm_port *port, bool 
attached,
int ret;
  
  	if (data == TYPEC_HOST)

-   ret = tcpm_mux_set(port, TYPEC_MUX_USB,
+   ret = tcpm_mux_set(port, TYPEC_MUX_USB_HOST,
   TCPC_USB_SWITCH_CONNECT);
else
-   ret = tcpm_mux_set(port, TYPEC_MUX_NONE,
-  TCPC_USB_SWITCH_DISCONNECT);
+   ret = tcpm_mux_set(port, TYPEC_MUX_USB_DEVICE,
+  TCPC_USB_SWITCH_CONNECT);
if (ret < 0)
return ret;
  
@@ -2025,6 +2025,7 @@ static void tcpm_reset_port(struct tcpm_port *port)

tcpm_init_vconn(port);
tcpm_set_current_limit(port, 0, 0);
tcpm_set_polarity(port, TYPEC_POLARITY_CC1);
+   tcpm_mux_set(port, TYPEC_MUX_NONE, TCPC_USB_SWITCH_DISCONNECT);
tcpm_set_attached_state(port, false);
port->try_src_count = 0;
port->try_snk_count = 0;
diff --git a/drivers/staging/typec/tcpm.h b/drivers/staging/typec/tcpm.h
index 7e9a6b7b5cd6..f662eed48c86 100644
--- a/drivers/staging/typec/tcpm.h
+++ b/drivers/staging/typec/tcpm.h
@@ -83,17 +83,23 @@ enum tcpc_usb_switch {
  };
  
  /* Mux state attributes */

-#define TCPC_MUX_USB_ENABLED   BIT(0)  /* USB enabled */
-#define TCPC_MUX_DP_ENABLEDBIT(1)  /* DP enabled */
-#define TCPC_MUX_POLARITY_INVERTED BIT(2)  /* Polarity inverted */
+#define TCPC_MUX_USB_DEVICE_ENABLEDBIT(0)  /* USB device enabled */
+#define TCPC_MUX_USB_HOST_ENABLED  BIT(1)  /* USB host enabled */
+#define TCPC_MUX_DP_SRC_ENABLEDBIT(2)  /* DP enabled */
+#define TCPC_MUX_POLARITY_INVERTED BIT(3)  /* Polarity inverted */
  
  /* Mux modes, decoded to attributes */

  enum tcpc_mux_mode {
-   TYPEC_MUX_NONE  = 0,/* Open switch */
-   TYPEC_MUX_USB   = TCPC_MUX_USB_ENABLED, /* USB only */
-   TYPEC_MUX_DP= TCPC_MUX_DP_ENABLED,  /* DP only */
-   TYPEC_MUX_DOCK  = TCPC_MUX_USB_ENABLED |/* Both USB and DP */
- TCPC_MUX_DP_ENABLED,
+   /* Open switch */
+   TYPEC_MUX_NONE = 0,
+   /* USB device only */
+   TYPEC_MUX_USB_DEVICE = TCPC_MUX_USB_DEVICE_ENABLED,
+   /* USB host only */
+   TYPEC_MUX_USB_HOST = TCPC_MUX_USB_HOST_ENABLED,
+   /* DP source only */
+   TYPEC_MUX_DP = TCPC_MUX_DP_SRC_ENABLED,
+   /* Both USB host and DP source */
+   TYPEC_MUX_DOCK = TCPC_MUX_USB_HOST_ENABLED | TCPC_MUX_DP_SRC_ENABLED,
  };
  
  struct tcpc_mux_dev {




--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v2 03/11] mux: core: Add usb.h header with MUX_USB_* and and MUX_TYPEC_* state constants

2017-09-10 Thread Peter Rosin
On 2017-09-08 19:07, Hans de Goede wrote:
> Hi,
> 
> On 08-09-17 17:47, Peter Rosin wrote:
>> On 2017-09-05 18:42, Hans de Goede wrote:
>>> Add MUX_USB_* and MUX_TYPEC_* state constant defines, which can be used by
>>> USB device/host, resp. Type-C polarity/role/altmode mux drivers and
>>> consumers to ensure that they agree on the meaning of the
>>> mux_control_select() state argument.
>>>
>>> Signed-off-by: Hans de Goede 
>>> ---

*snip*

>>> +/*
>>> + * Mux state values for Type-C polarity/role/altmode muxes.
>>> + *
>>> + * MUX_TYPEC_POLARITY_INV may be or-ed together with any other mux-state as
>>> + * inverted-polarity (Type-C plugged in upside down) can happen with any
>>> + * other mux-state.
>>> + */
>>> +#define MUX_TYPEC_POLARITY_INV BIT(0)   /* Polarity inverted 
>>> bit */
>>> +#define MUX_TYPEC_DEVICE   (0 << 1) /* USB device mode */
>>> +#define MUX_TYPEC_HOST (1 << 1) /* USB host mode */
>>> +#define MUX_TYPEC_HOST_AND_DP_SRC  (2 << 1) /* USB host + 2 lanes DP src */
>>> +#define MUX_TYPEC_DP_SRC   (3 << 1) /* 4 lanes Display Port src */
>>> +#define MUX_TYPEC_STATES   (4 << 1)
>>
>> But USB Type-C muxes need not support just these states If I read it right?
>> USB Type-C seems to be usable for a variety of protocols and the above list
>> seems pretty much like a special case for this mux (and perhaps a set of
>> other similar muxes). But when someone with a USB Type-C mux for different
>> protocols shows up, that person will probably be frustrated by these
>> defines, no? Or is there something I don't see that limits USB-C to DP?
> 
> In general almost all hardware is limited to the above (+ analog audio over
> the 2 Sideband use pins, but I expect that to have a separate mux).
> 
> You're right, theoretically there might be other cases, e.g. there is a spec
> for HDMI over Type-C (wishful thinking from the HDMI group, no one uses this),
> but:
> 
> 1) I expect most muxes to implement the above set, that is what all
> hardware out there supports (well that or less).
> 
> 2) We can always add extra defines here, that means that a Type-C mux may
> not implement all states and return -EINVAL when asked for something it
> does not implement, which I understand is a bit weird from a mux subsys
> pov. But that can be the case anyways because even though the mux supports
> these options, the board it is used on does no necessarily have to support
> these options, e.g. there may be only 2 lanes of DP hooked up to the mux
> (or no DP at all, but then I would them to expect a different mux).
> 
> So the Type-C Port Manager already needs to be passed some platform
> data describing which features the board has and keep that in mind
> when negotiation with the dongle attached to the Type-C port, so if
> we do get boards which do HDMI and no DP, then the TCPM would simply
> never use the MUX_TYPEC_HOST_AND_DP_SRC and MUX_TYPEC_DP_SRC states.

Ok, I googled "usb type c mux" and came up with HD3SS460 from Texas as
the first hit.

http://www.ti.com/lit/ds/symlink/hd3ss460.pdf

That one has three control pins, but two of them (AMSEL and EN) are
tri-state. So 18 states in theory. However, if EN is low everything is
HighZ, so that collapses 6 states into 1, and 2 other states are reserved.
Still 11 states, which is two more than what you have implemented for
PI3USB30532. If we ignore polarity switching, it's only a one state diff.
However, when I try to make sense of the states for the HD3SS460, I don't
see anything that selects USB device or host. And I don't really see why
a Type C mux has to know that; in my head the mux should just route the
signals. And then when I look in your PI3USB30532 driver I don't seen any
such difference either. Along the same lines, the Type C mux does not
know/care if DP is source or sink. Or?

How about:

#define MUX_TYPEC_POLARITY_INV  BIT(0)   /* Polarity inverted bit */
#define MUX_TYPEC_USB   (0 << 1) /* USB only mode */
#define MUX_TYPEC_USB_AND_DP(1 << 1) /* USB host + 2 lanes DP */
#define MUX_TYPEC_DP(2 << 1) /* 4 lanes Display Port */
#define MUX_TYPEC_STATES(3 << 1)

I'm not sure what 2 states the HS3SS460 have in addition to the above, but
the way I read the spec those to are variations on the MUX_TYPEC_USB_AND_DP
state, but routing the DP signals to alternate pins. Which suggests that
more documentation is needed to describe exactly what is meant when someone
selects MUX_TYPEC_USB_AND_DP?

Cheers,
Peter
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 4/5] typec: tcpm: Move out of staging

2017-09-10 Thread Guenter Roeck

On 09/10/2017 01:46 PM, Joe Perches wrote:

On Sun, 2017-09-10 at 13:37 -0700, Guenter Roeck wrote:

Move tcpm (USB Type-C Port Manager) out of staging.


git format-patch -M



Thanks - I'll resend but wait a bit for additional comments before I do.

Guenter

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 4/5] typec: tcpm: Move out of staging

2017-09-10 Thread Joe Perches
On Sun, 2017-09-10 at 13:37 -0700, Guenter Roeck wrote:
> Move tcpm (USB Type-C Port Manager) out of staging.

git format-patch -M

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 1/5] staging: typec: tcpm: Drop commented out code

2017-09-10 Thread Guenter Roeck
Commented out code can be added as needed. Drop it.
Also drop TODO and an obsolete XXX comment.

Signed-off-by: Guenter Roeck 
---
 drivers/staging/typec/tcpm.c | 37 +
 1 file changed, 1 insertion(+), 36 deletions(-)

diff --git a/drivers/staging/typec/tcpm.c b/drivers/staging/typec/tcpm.c
index 8af62e74d54c..cb25ec8334b0 100644
--- a/drivers/staging/typec/tcpm.c
+++ b/drivers/staging/typec/tcpm.c
@@ -908,27 +908,6 @@ static void svdm_consume_identity(struct tcpm_port *port, 
const __le32 *payload,
 
memset(>mode_data, 0, sizeof(port->mode_data));
 
-#if 0 /* Not really a match */
-   switch (PD_IDH_PTYPE(vdo)) {
-   case IDH_PTYPE_UNDEF:
-   port->partner.type = TYPEC_PARTNER_NONE; /* no longer exists */
-   break;
-   case IDH_PTYPE_HUB:
-   break;
-   case IDH_PTYPE_PERIPH:
-   break;
-   case IDH_PTYPE_PCABLE:
-   break;
-   case IDH_PTYPE_ACABLE:
-   break;
-   case IDH_PTYPE_AMA:
-   port->partner.type = TYPEC_PARTNER_ALTMODE;
-   break;
-   default:
-   break;
-   }
-#endif
-
port->partner_ident.id_header = vdo;
port->partner_ident.cert_stat = le32_to_cpu(payload[VDO_INDEX_CSTAT]);
port->partner_ident.product = product;
@@ -1103,11 +1082,7 @@ static int tcpm_pd_svdm(struct tcpm_port *port, const 
__le32 *payload, int cnt,
response[0] = VDO(svid, 1, CMD_DISCOVER_MODES);
rlen = 1;
} else {
-#if 0
-   response[0] = pd_dfp_enter_mode(port, 0, 0);
-   if (response[0])
-   rlen = 1;
-#endif
+   /* enter alternate mode if/when implemented */
}
break;
case CMD_ENTER_MODE:
@@ -1145,10 +1120,6 @@ static void tcpm_handle_vdm_request(struct tcpm_port 
*port,
 
if (PD_VDO_SVDM(p0))
rlen = tcpm_pd_svdm(port, payload, cnt, response);
-#if 0
-   else
-   rlen = tcpm_pd_custom_vdm(port, cnt, payload, response);
-#endif
 
if (rlen > 0) {
tcpm_queue_vdm(port, response[0], [1], rlen - 1);
@@ -2442,7 +2413,6 @@ static void run_state_machine(struct tcpm_port *port)
tcpm_set_state(port, SNK_STARTUP, 0);
break;
case SNK_STARTUP:
-   /* XXX: callback into infrastructure */
opmode =  tcpm_get_pwr_opmode(port->polarity ?
  port->cc2 : port->cc1);
typec_set_pwr_opmode(port->typec_port, opmode);
@@ -3589,11 +3559,6 @@ struct tcpm_port *tcpm_register_port(struct device *dev, 
struct tcpc_dev *tcpc)
 
port->partner_desc.identity = >partner_ident;
port->port_type = tcpc->config->type;
-   /*
-* TODO:
-*  - alt_modes, set_alt_mode
-*  - {debug,audio}_accessory
-*/
 
port->typec_port = typec_register_port(port->dev, >typec_caps);
if (!port->typec_port) {
-- 
2.7.4

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 2/5] staging: typec: tcpm: Document data structures

2017-09-10 Thread Guenter Roeck
Document struct tcpc_config and struct tcpc_dev.
Drop unused TCPC_USB_SWITCH_RESTORE.

Signed-off-by: Guenter Roeck 
---
 drivers/staging/typec/tcpm.h | 57 ++--
 1 file changed, 50 insertions(+), 7 deletions(-)

diff --git a/drivers/staging/typec/tcpm.h b/drivers/staging/typec/tcpm.h
index 7e9a6b7b5cd6..073197f0d2bb 100644
--- a/drivers/staging/typec/tcpm.h
+++ b/drivers/staging/typec/tcpm.h
@@ -54,6 +54,27 @@ enum tcpm_transmit_type {
TCPC_TX_BIST_MODE_2 = 7
 };
 
+/**
+ * struct tcpc_config - Port configuration
+ * @src_pdo:   PDO parameters sent to port partner as response to
+ * PD_CTRL_GET_SOURCE_CAP message
+ * @nr_src_pdo:Number of entries in @src_pdo
+ * @snk_pdo:   PDO parameters sent to partner as response to
+ * PD_CTRL_GET_SINK_CAP message
+ * @nr_snk_pdo:Number of entries in @snk_pdo
+ * @max_snk_mv:Maximum acceptable sink voltage in mV
+ * @max_snk_ma:Maximum sink current in mA
+ * @max_snk_mw:Maximum required sink power in mW
+ * @operating_snk_mw:
+ * Required operating sink power in mW
+ * @type:  Port type (TYPEC_PORT_DFP, TYPEC_PORT_UFP, or
+ * TYPEC_PORT_DRP)
+ * @default_role:
+ * Default port role (TYPEC_SINK or TYPEC_SOURCE).
+ * Set to TYPEC_NO_PREFERRED_ROLE if no default role.
+ * @try_role_hw:True if try.{Src,Snk} is implemented in hardware
+ * @alt_modes: List of supported alternate modes
+ */
 struct tcpc_config {
const u32 *src_pdo;
unsigned int nr_src_pdo;
@@ -79,7 +100,6 @@ struct tcpc_config {
 enum tcpc_usb_switch {
TCPC_USB_SWITCH_CONNECT,
TCPC_USB_SWITCH_DISCONNECT,
-   TCPC_USB_SWITCH_RESTORE,/* TODO FIXME */
 };
 
 /* Mux state attributes */
@@ -104,17 +124,40 @@ struct tcpc_mux_dev {
void *priv_data;
 };
 
+/**
+ * struct tcpc_dev - Port configuration and callback functions
+ * @config:Pointer to port configuration
+ * @get_vbus:  Called to read current VBUS state
+ * @get_current_limit:
+ * Optional; called by the tcpm core when configured as a snk
+ * and cc=Rp-def. This allows the tcpm to provide a fallback
+ * current-limit detection method for the cc=Rp-def case.
+ * For example, some tcpcs may include BC1.2 charger detection
+ * and use that in this case.
+ * @set_cc:Called to set value of CC pins
+ * @get_cc:Called to read current CC pin values
+ * @set_polarity:
+ * Called to set polarity
+ * @set_vconn: Called to enable or disable VCONN
+ * @set_vbus:  Called to enable or disable VBUS
+ * @set_current_limit:
+ * Optional; called to set current limit as negotiated
+ * with partner.
+ * @set_pd_rx: Called to enable or disable reception of PD messages
+ * @set_roles: Called to set power and data roles
+ * @start_drp_toggling:
+ * Optional; if supported by hardware, called to start DRP
+ * toggling. DRP toggling is stopped automatically if
+ * a connection is established.
+ * @try_role:  Optional; called to set a preferred role
+ * @pd_transmit:Called to transmit PD message
+ * @mux:   Pointer to multiplexer data
+ */
 struct tcpc_dev {
const struct tcpc_config *config;
 
int (*init)(struct tcpc_dev *dev);
int (*get_vbus)(struct tcpc_dev *dev);
-   /*
-* This optional callback gets called by the tcpm core when configured
-* as a snk and cc=Rp-def. This allows the tcpm to provide a fallback
-* current-limit detection method for the cc=Rp-def case. E.g. some
-* tcpcs may include BC1.2 charger detection and use that in this case.
-*/
int (*get_current_limit)(struct tcpc_dev *dev);
int (*set_cc)(struct tcpc_dev *dev, enum typec_cc_status cc);
int (*get_cc)(struct tcpc_dev *dev, enum typec_cc_status *cc1,
-- 
2.7.4

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 5/5] usb: typec: fusb302: Move out of staging

2017-09-10 Thread Guenter Roeck
The driver is in good enough shape to be moved out of staging.
Do it.

Signed-off-by: Guenter Roeck 
---
 drivers/staging/typec/Kconfig   |2 -
 drivers/staging/typec/Makefile  |1 -
 drivers/staging/typec/fusb302/Kconfig   |7 -
 drivers/staging/typec/fusb302/Makefile  |1 -
 drivers/staging/typec/fusb302/TODO  |   10 -
 drivers/staging/typec/fusb302/fusb302.c | 1947 ---
 drivers/staging/typec/fusb302/fusb302_reg.h |  186 ---
 drivers/usb/typec/Kconfig   |6 +
 drivers/usb/typec/Makefile  |1 +
 drivers/usb/typec/fusb302/Kconfig   |7 +
 drivers/usb/typec/fusb302/Makefile  |1 +
 drivers/usb/typec/fusb302/fusb302.c | 1947 +++
 drivers/usb/typec/fusb302/fusb302_reg.h |  186 +++
 13 files changed, 2148 insertions(+), 2154 deletions(-)
 delete mode 100644 drivers/staging/typec/fusb302/Kconfig
 delete mode 100644 drivers/staging/typec/fusb302/Makefile
 delete mode 100644 drivers/staging/typec/fusb302/TODO
 delete mode 100644 drivers/staging/typec/fusb302/fusb302.c
 delete mode 100644 drivers/staging/typec/fusb302/fusb302_reg.h
 create mode 100644 drivers/usb/typec/fusb302/Kconfig
 create mode 100644 drivers/usb/typec/fusb302/Makefile
 create mode 100644 drivers/usb/typec/fusb302/fusb302.c
 create mode 100644 drivers/usb/typec/fusb302/fusb302_reg.h

diff --git a/drivers/staging/typec/Kconfig b/drivers/staging/typec/Kconfig
index 31fad23c2553..5359f556d203 100644
--- a/drivers/staging/typec/Kconfig
+++ b/drivers/staging/typec/Kconfig
@@ -9,8 +9,6 @@ config TYPEC_TCPCI
help
  Type-C Port Controller driver for TCPCI-compliant controller.
 
-source "drivers/staging/typec/fusb302/Kconfig"
-
 endif
 
 endmenu
diff --git a/drivers/staging/typec/Makefile b/drivers/staging/typec/Makefile
index e1df3f0fde10..53d649abcb53 100644
--- a/drivers/staging/typec/Makefile
+++ b/drivers/staging/typec/Makefile
@@ -1,2 +1 @@
 obj-$(CONFIG_TYPEC_TCPCI)  += tcpci.o
-obj-y  += fusb302/
diff --git a/drivers/staging/typec/fusb302/Kconfig 
b/drivers/staging/typec/fusb302/Kconfig
deleted file mode 100644
index 48a4f2fcee03..
--- a/drivers/staging/typec/fusb302/Kconfig
+++ /dev/null
@@ -1,7 +0,0 @@
-config TYPEC_FUSB302
-   tristate "Fairchild FUSB302 Type-C chip driver"
-   depends on I2C && POWER_SUPPLY
-   help
- The Fairchild FUSB302 Type-C chip driver that works with
- Type-C Port Controller Manager to provide USB PD and USB
- Type-C functionalities.
diff --git a/drivers/staging/typec/fusb302/Makefile 
b/drivers/staging/typec/fusb302/Makefile
deleted file mode 100644
index 207efa5fbab8..
--- a/drivers/staging/typec/fusb302/Makefile
+++ /dev/null
@@ -1 +0,0 @@
-obj-$(CONFIG_TYPEC_FUSB302)+= fusb302.o
diff --git a/drivers/staging/typec/fusb302/TODO 
b/drivers/staging/typec/fusb302/TODO
deleted file mode 100644
index 19b466eb585d..
--- a/drivers/staging/typec/fusb302/TODO
+++ /dev/null
@@ -1,10 +0,0 @@
-fusb302:
-- Find a better logging scheme, at least not having the same debugging/logging
-  code replicated here and in tcpm
-- Find a non-hacky way to coordinate between PM and I2C access
-- Documentation? The FUSB302 datasheet provides information on the chip to help
-  understand the code. But it may still be helpful to have a documentation.
-- We may want to replace the  "fcs,max-snk-microvolt", "fcs,max-snk-microamp",
-  "fcs,max-snk-microwatt" and "fcs,operating-snk-microwatt" device(tree)
-  properties with properties which are part of a generic type-c controller
-  devicetree binding.
diff --git a/drivers/staging/typec/fusb302/fusb302.c 
b/drivers/staging/typec/fusb302/fusb302.c
deleted file mode 100644
index e790b67d4953..
--- a/drivers/staging/typec/fusb302/fusb302.c
+++ /dev/null
@@ -1,1947 +0,0 @@
-/*
- * Copyright 2016-2017 Google, Inc
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * Fairchild FUSB302 Type-C Chip Driver
- */
-
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-
-#include "fusb302_reg.h"
-
-/*
- * When the device is SNK, BC_LVL interrupt is used to monitor cc pins
- * for the current 

[PATCH 3/5] staging: typec: pd: Document struct pd_message

2017-09-10 Thread Guenter Roeck
struct pd_message is the format of a PD message as seen on the wire.

Signed-off-by: Guenter Roeck 
---
 drivers/staging/typec/pd.h | 5 +
 1 file changed, 5 insertions(+)

diff --git a/drivers/staging/typec/pd.h b/drivers/staging/typec/pd.h
index 30b32ad72acd..42a10883a2cb 100644
--- a/drivers/staging/typec/pd.h
+++ b/drivers/staging/typec/pd.h
@@ -104,6 +104,11 @@ static inline unsigned int pd_header_msgid_le(__le16 
header)
 
 #define PD_MAX_PAYLOAD 7
 
+/*
+ * struct pd_message - PD message as seen on wire
+ * @header:PD message header
+ * @payload:   PD message payload
+ */
 struct pd_message {
__le16 header;
__le32 payload[PD_MAX_PAYLOAD];
-- 
2.7.4

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Vai mēs varam būt draugi?

2017-09-10 Thread KATIE HIGGINS

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Fwd: RH Bugzilla - Bug 1482649 - Logitech USB Unified Receiver+M570 need 'waking' up by click after kernel update

2017-09-10 Thread Michael Simms
dammit, plain text version...

-- Forwarded message --
From: Michael Simms 
Date: 10 September 2017 at 20:39
Subject: Re: RH Bugzilla - Bug 1482649 - Logitech USB Unified
Receiver+M570 need 'waking' up by click after kernel update
To: Alan Stern 
Cc: "linux-in...@vger.kernel.org" ,
"linux-usb@vger.kernel.org" , Mike Simms
, Jiri Kosina , Benjamin
Tissoires 


Hi Alan, thanks for the cat instruction, it was very helpful. As
suggested I'm replying from my Google Mail account to see if this will
be accepted by the kernel mail server.

/sys/bus/usb/devices/2-1.3/2-1.3:0/power empty for both 4.11 and 4.12 sessions.

for both kernel sessions in the parent directory
"/sys/bus/usb/devices/2-1.3/2-1.3:0/" I found a file called
"supports_autosuspend" with a value of 1.

the reason I posted from the sub-folder
"/sys/bus/usb/devices/2-1.3:1.0/0003:046D:C52B.0001/power" originally
is because that contains all the rest of device power information.

idle output for 4.11 after the registration of 1 click and then
leaving the TrackBall alone. This is the sum total of the output:

8d3a08641300 1212513828 C Ii:2:003:3 0:2 15 = 20010201 
 00
8d3a08641300 1212513889 S Ii:2:003:3 -115:2 32 <
8d3a08641300 1212607820 C Ii:2:003:3 0:2 15 = 20010200 
 00
8d3a08641300 1212607884 S Ii:2:003:3 -115:2 32 <
8d39d4f0ad80 1263013819 S Co:2:003:0 s 21 09 0210 0002 0007 7 =
1001810d 00
8d39d4f0ad80 1263014056 C Co:2:003:0 0 7 >
8d3a08641300 1264053446 C Ii:2:003:3 0:2 7 = 1001810d 5a2432
8d3a08641300 1264053479 S Ii:2:003:3 -115:2 32 <

active output for 4.11:


8d3a08641300 555166285 C Ii:2:003:3 0:2 15 = 20010200 3000
 00
8d3a08641300 555166348 S Ii:2:003:3 -115:2 32 <
8d3a08641300 555174282 C Ii:2:003:3 0:2 15 = 20010200 00012000
 00
8d3a08641300 555174330 S Ii:2:003:3 -115:2 32 <
8d3a08641300 555182279 C Ii:2:003:3 0:2 15 = 20010200 00033000
 00
8d3a08641300 555182330 S Ii:2:003:3 -115:2 32 <
8d3a08641300 555190281 C Ii:2:003:3 0:2 15 = 20010200 00034000
 00
8d3a08641300 555190330 S Ii:2:003:3 -115:2 32 <
8d3a08641300 555198281 C Ii:2:003:3 0:2 15 = 20010200 00033000
 00
8d3a08641300 555198331 S Ii:2:003:3 -115:2 32 <
8d3a08641300 555204285 C Ii:2:003:3 0:2 15 = 20010200 00034000
 00
8d3a08641300 555204334 S Ii:2:003:3 -115:2 32 <
8d3a08641300 555212281 C Ii:2:003:3 0:2 15 = 20010200 00024000
 00
8d3a08641300 555212331 S Ii:2:003:3 -115:2 32 <
8d3a08641300 555220281 C Ii:2:003:3 0:2 15 = 20010200 00034000
 00
8d3a08641300 555220330 S Ii:2:003:3 -115:2 32 <
8d3a08641300 555228280 C Ii:2:003:3 0:2 15 = 20010200 00034000
 00
8d3a08641300 555228330 S Ii:2:003:3 -115:2 32 <
8d3a08641300 555236277 C Ii:2:003:3 0:2 15 = 20010200 00045000
 00
8d3a08641300 555236323 S Ii:2:003:3 -115:2 32 <
8d3a08641300 555244280 C Ii:2:003:3 0:2 15 = 20010200 00045000
 00
8d3a08641300 555244331 S Ii:2:003:3 -115:2 32 <
8d3a08641300 555252278 C Ii:2:003:3 0:2 15 = 20010200 00037000
 00
8d3a08641300 555252327 S Ii:2:003:3 -115:2 32 <
8d3a08641300 555260281 C Ii:2:003:3 0:2 15 = 20010200 00034000
 00
8d3a08641300 555260331 S Ii:2:003:3 -115:2 32 <
8d3a08641300 555268278 C Ii:2:003:3 0:2 15 = 20010200 00013000
 00
8d3a08641300 555268327 S Ii:2:003:3 -115:2 32 <
8d3a08641300 555276278 C Ii:2:003:3 0:2 15 = 20010200 00034000
 00
8d3a08641300 555276328 S Ii:2:003:3 -115:2 32 <
8d3a08641300 555284247 C Ii:2:003:3 0:2 15 = 20010200 00023000
 00
8d3a08641300 555284293 S Ii:2:003:3 -115:2 32 <
8d3a08641300 555290282 C Ii:2:003:3 0:2 15 = 20010200 00043000
 00
8d3a08641300 555290333 S Ii:2:003:3 -115:2 32 <
8d3a08641300 555300281 C Ii:2:003:3 0:2 15 = 20010200 00033000
 00
8d3a08641300 555300328 S Ii:2:003:3 -115:2 32 <
8d3a08641300 555306284 C Ii:2:003:3 0:2 15 = 20010200 00063000
 00
8d3a08641300 555306334 S Ii:2:003:3 -115:2 32 <
8d3a08641300 555314280 C Ii:2:003:3 0:2 15 = 20010200 00064000
 00
8d3a08641300 555314330 S Ii:2:003:3 -115:2 32 <
8d3a08641300 555322277 C Ii:2:003:3 0:2 15 = 20010200 00072000
 00
8d3a08641300 555322327 S Ii:2:003:3 -115:2 32 <
8d3a08641300 555330279 C Ii:2:003:3 0:2 15 = 20010200 00062000
 00
8d3a08641300 555330331 S Ii:2:003:3 -115:2 32 <
8d3a08641300 555338280 C Ii:2:003:3 0:2 15 = 20010200 00062000
 00
8d3a08641300 555338329 S Ii:2:003:3 -115:2 32 <
8d3a08641300 555346279 C Ii:2:003:3 0:2 15 = 20010200 00051000

Re: USB mouse

2017-09-10 Thread Bruce Korb
# lsusb
Bus 007 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 011 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 005 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 004 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 010 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 006 Device 002: ID 03f0:0e2a Hewlett-Packard
Bus 006 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 009 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 008 Device 004: ID 046d:c245 Logitech, Inc. G400 Optical Mouse
Bus 008 Device 002: ID 0764:0501 Cyber Power System, Inc. CP1500 AVR UPS
Bus 008 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 004: ID 05e3:0617 Genesys Logic, Inc.
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 011: ID 046d:c068 Logitech, Inc. G500 Laser Mouse
Bus 001 Device 010: ID 056a:0317 Wacom Co., Ltd
Bus 001 Device 009: ID 045e:00db Microsoft Corp. Natural Ergonomic Keyboard 4000
V1.0
Bus 001 Device 008: ID 05e3:0610 Genesys Logic, Inc. 4-port hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

This is with a different hub that happens to have a Wacom tablet plugged in.
I am typing with the keyboard on this configuration, but
the G500 Laser Mouse is not working. I am using the G400.
There is a switch also in the mix, but everything works just fine
on OS/X Sierra when the switch points to that computer.
So openSUSE 42.1 could see the interrupts and messages,
OS/X Sierra sees them now, openSUSE responds to the keyboard,
SD card reader and Wacom tablet in all USB ports, and it
sees the mouse but won't take its input.

If you are familiar with brands, the original hub is "plugable" and the
alternate (in use now) is an off-brand Kingwin.

>> # cat /sys/kernel/debug/usb/usbmon/2u
> ...
>> 880667cc5e00 1869399303 S Ii:2:007:1 -115:1 8 <
>> 880667cc5e00 1869466503 C Ii:2:007:1 -2:1 0
>> 880667cc5e00 1869527243 S Ii:2:007:1 -115:1 8 <
>> 880667cc5e00 1869614516 C Ii:2:007:1 -2:1 0
>> 880667cc5e00 1869631409 S Ii:2:007:1 -115:1 8 <
>> <>
>
> It's a little surprising that the interrupt URB is cancelled twice and
> then restarted.  But there's nothing wrong with that.

I wouldn't know.

> I don't see anything else noteworthy in this.  What do you obtain from
> usbmon when you plug the mouse directly into the computer?

# lsusb
Bus 007 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 011 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 005 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 004 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 010 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 006 Device 002: ID 03f0:0e2a Hewlett-Packard
Bus 006 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 009 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 008 Device 004: ID 046d:c245 Logitech, Inc. G400 Optical Mouse
Bus 008 Device 002: ID 0764:0501 Cyber Power System, Inc. CP1500 AVR UPS
Bus 008 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 004: ID 05e3:0617 Genesys Logic, Inc.
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 011: ID 046d:c068 Logitech, Inc. G500 Laser Mouse
Bus 001 Device 010: ID 056a:0317 Wacom Co., Ltd
Bus 001 Device 009: ID 045e:00db Microsoft Corp. Natural Ergonomic Keyboard 4000
V1.0
Bus 001 Device 008: ID 05e3:0610 Genesys Logic, Inc. 4-port hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

# cat /sys/kernel/debug/usb/usbmon/8u
88081a105900 1168748717 C Ii:8:002:1 0:8 6 = 0864c003 2c01
88081a105900 1168748737 S Ii:8:002:1 -115:8 6 <
88081a105900 1168756714 C Ii:8:002:1 0:8 2 = 0b11
88081a105900 1168756726 S Ii:8:002:1 -115:8 6 <
88081a223b00 1171578632 C Ii:8:001:1 0:128 1 = 20
88081a223b00 1171578656 S Ii:8:001:1 -115:128 2 <
88009bfeca00 1171578679 S Ci:8:001:0 s a3 00  0005 0004 4 <
88009bfeca00 1171578689 C Ci:8:001:0 0 4 = 01010100
88009bfeca00 1171578695 S Co:8:001:0 s 23 01 0010 0005  0
88009bfeca00 1171578699 C Co:8:001:0 0 0
88009bfeca00 1171578704 S Ci:8:001:0 s a3 00  0005 0004 4 <
88009bfeca00 1171578709 C Ci:8:001:0 0 4 = 0101
880713bde300 1171610554 S Ci:8:001:0 s a3 00  0005 0004 4 <
880713bde300 1171610571 C Ci:8:001:0 0 4 = 0101
88070c5c4800 1171642538 S Ci:8:001:0 s a3 00  0005 0004 4 <
88070c5c4800 1171642553 C Ci:8:001:0 0 4 = 0101
8800ba02dc00 1171674529 S Ci:8:001:0 s a3 00  0005 0004 4 <
8800ba02dc00 1171674545 C Ci:8:001:0 0 4 = 0101
8800ba02dc00 1171706545 S Ci:8:001:0 s a3 00  0005 0004 4 <
8800ba02dc00 1171706560 C Ci:8:001:0 0 4 = 0101
8800ba02dc00 1171706577 S Co:8:001:0 s 23 03 0004 0005  0
8800ba02dc00 1171732508 C 

Re: USB mouse

2017-09-10 Thread Alan Stern
On Sat, 9 Sep 2017, Bruce Korb wrote:

> Hi Alan,
> 
> On Sat, Sep 9, 2017 at 12:48 PM, Alan Stern  wrote:
> > Questions like this should always be sent to the linux-usb mailing
> > list (CC'ed).
> 
> I had the vein hope it was a known issue.
> 
> > You should start by collecting another usbmon trace.  This time: unplug
> > the mouse, then start the trace, then plug the mouse into the hub and
> > click it a few times, then stop the trace.  That way we can see the
> > exact sequence of everything that happens.
> 
> Done (and copied to bug report also):
> 
> # cat /sys/kernel/debug/usb/usbmon/2u
...
> 880667cc5e00 1869399303 S Ii:2:007:1 -115:1 8 <
> 880667cc5e00 1869466503 C Ii:2:007:1 -2:1 0
> 880667cc5e00 1869527243 S Ii:2:007:1 -115:1 8 <
> 880667cc5e00 1869614516 C Ii:2:007:1 -2:1 0
> 880667cc5e00 1869631409 S Ii:2:007:1 -115:1 8 <
> <>

It's a little surprising that the interrupt URB is cancelled twice and 
then restarted.  But there's nothing wrong with that.

I don't see anything else noteworthy in this.  What do you obtain from
usbmon when you plug the mouse directly into the computer?

It's quite possible that your hub isn't working right.  Have you tried
testing with a different hub?  Maybe a USB-2 hub rather than USB-3?

Alan Stern

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: RH Bugzilla - Bug 1482649 - Logitech USB Unified Receiver+M570 need 'waking' up by click after kernel update

2017-09-10 Thread Alan Stern
On Sat, 9 Sep 2017, Mike Simms wrote:

> > Did you do this?
> > 
> > Alan Stern
> 
> Yes, the information was already in the message quoted in your reply:
> 
> > > 4.11.11-300.fc26.x86_64 and 4.12.9-300.fc26.x86_64 
> > >  are showing identical settings - autosuspend definitely on for 
> > > device /sys/bus/usb/devices/2-1.3/2-1.3:1.0/0003:046D:C52B.0001/power 

This is not what I asked you to do.  I asked you to check the contents 
of /sys/bus/usb/devices/2-1.3/2-1.3:1.0/power.  Not
/sys/bus/usb/devices/2-1.3/2-1.3:1.0/0003:046D:C52B.0001/power.

> > > it shows in the powertop UI as good for both kernels and 
> > > 
> > > Folder contents are autosuspend_delay_ms (can't open), control
> > > (auto), runtime_active_time (0), runtime_status (unsupported), 
> 
> Frustratingly I can't CC the linux-usb or linux-input mailing lists, my
> emails are rejected as spam otherwise it would be a heck of a lot
> easier to share all this information with you. You are in my reply
> to all list, so you should get any further communications with Jiri too.

The mailing lists reject email in HTML format, but that's not the case
here.  Maybe there's something about outlook.com they don't like.  You
could try signing up for a gmail account and sending from it.

> Did you get the last email containing usbmon traces? You should have but
> please check your spam or junk folder just in case.

I did get it.  Nothing unusual jumped out.  The trace showed that when 
you started using the trackball again after it had been suspended, the 
wake-up procedure took a little under 0.1 seconds.  That's long enough 
to be perceptible, and it's understandable that the delay could be 
annoying.

(Incidentally, the output format is more condensed if instead of
running the usbmon program, you do:

sudo cat /sys/kernel/debug/usb/usbmon/2u >/tmp/mon.out

or the equivalent.)

When you collected the data for the /dev/bus/.../power files, was that
while the trackball was active or while it was suspended?  The default
setting is to suspend it after a few seconds of inactivity, so you can
force it to remain at full power by clicking it and moving it around
while you copy the file data.  It would be worthwhile to compare this 
with the file contents collected while the device was suspended.

You know, this change in behavior could easily be the result of a bug
fix.  It's possible that a bug in the 4.11 kernel was preventing the
trackball from suspending, and when the bug was fixed in 4.12, the
kernel was then able to suspend the device automatically.  Perhaps Jiri
can find a change having that effect.

Anyway, if you don't want the trackball to be suspended while it's not
in use, you can simply turn off power-saving for that device.  Either
in powertop or in a shell script or in a udev script.

Alan Stern

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[SUSPECTED SPAM] I am a Buyer

2017-09-10 Thread mackenzie


Dear Sir/Madam,

I am Becca MacKenzie, We are interested in your products and want to make you 
and your company our major suppliers but first we would like your to send us 
your best price list and Catalog if possible.

We will be ordering in large quantity so we are looking forward in making a 
good relationship with you and your company.

For my quick response write only to my contact email: 
becca.mackenzie...@outlook.com

Regards
Becca MacKenzie
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[SUSPECTED SPAM] Can you be our Supplier

2017-09-10 Thread mackenzie


Dear Sir/Madam,

I am Becca MacKenzie, We are interested in your products and want to make you 
and your company our major suppliers but first we would like your to send us 
your best price list and Catalog if possible.

We will be ordering in large quantity so we are looking forward in making a 
good relationship with you and your company.

My contact email: becca.mackenzie...@outlook.com

Regards
Becca MacKenzie
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html