Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp220027ybl; Thu, 30 Jan 2020 20:45:01 -0800 (PST) X-Google-Smtp-Source: APXvYqzYL9CrQcRa4GsiT5H6FfmRXJEZr380u01LiKedCgs/TrH6C5KAdxtqXCRvRnMiOw4GIWyb X-Received: by 2002:aca:1a06:: with SMTP id a6mr5031324oia.148.1580445901360; Thu, 30 Jan 2020 20:45:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1580445901; cv=none; d=google.com; s=arc-20160816; b=Pk41CtzDt7jXds3nKELRKLXcemiUB8B/BikBhemIfik/XOpHCIIRQn25wgH0hsviUE 3zha3875OwWo9FpVm+7RceYIEJt1GUqEBEs0wmI0dGq3gqNM3YvMM4mnEiXJ7tFwzSGA yXcU/NZ7dfn/kOtwGhu5IyhWl6Exl3oYOw4g/CtwtpXWswd+GsLfzDlXwgXny4ytPgF+ EwbraI/t93f9VFhmQpWHC5CmOH/vZPqWZcSpkgDhfmzY0obeRdTv/+149q77VtQulkmK t1hoXU2fVlD9JRfDxa22ZoB4kgsd6CbzQivkuYqj2HTwKp8FW1r8S3yPwkrIyrvEN8Jm gCSQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dmarc-filter:dkim-signature; bh=Ll0wcKc1k7IzcI6Q0ZHQPG6BHe+VN/nY0QZPu5GmLGY=; b=MLFd4ijPiO7IhMPRVcF8fIDAGieVslIXUTP47PeQs+FzxWEp/wGnrAcy5p5hgwn4z/ zlvNSDhnB7SfQud9DZhjh45fYzPRJTVh5flSYtk/DQfGcONpJkq/sFjD1oi9j3HKU7od 6gDA0KizqDVNoPFJBQCLgjnFZaD3mV4TXaNa3XsFvSjo0EMTAoYzdCEybBIAMFOaZvL9 1+Ed2bDmaDbyCeIXy/0hsuhVArP5Qne19Gv8dNnZ/chqec186f+VKGGwb4zMtl0G4jqI bvtgMVWXn7OU2Xeo/TqSqcGjKzQhs4O2y6T/5dWA3dXiizvOF3vQRLF3RcI8Ag5rwZs+ opgw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@mg.codeaurora.org header.s=smtp header.b=kBN2T6XT; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s20si1627887oie.210.2020.01.30.20.44.49; Thu, 30 Jan 2020 20:45:01 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@mg.codeaurora.org header.s=smtp header.b=kBN2T6XT; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728043AbgAaEnt (ORCPT + 99 others); Thu, 30 Jan 2020 23:43:49 -0500 Received: from mail26.static.mailgun.info ([104.130.122.26]:50802 "EHLO mail26.static.mailgun.info" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727981AbgAaEnt (ORCPT ); Thu, 30 Jan 2020 23:43:49 -0500 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.codeaurora.org; q=dns/txt; s=smtp; t=1580445828; h=Message-Id: Date: Subject: Cc: To: From: Sender; bh=Ll0wcKc1k7IzcI6Q0ZHQPG6BHe+VN/nY0QZPu5GmLGY=; b=kBN2T6XTaIW43e+mNE5Nb4494r4H7yZAzewy5zVaiqrpWcNW+zVDUOER97ZiRXe0wtuCqLsk tVbzXJLaR7yo82Tn2lBGhjrnYgW8yW0ZBNWu+lMzx49XJaTZrD4HUZ6dDU449Fr5msieIfOa BgwMad295hRXN2e4eJ5W8Rar2M4= X-Mailgun-Sending-Ip: 104.130.122.26 X-Mailgun-Sid: WyI0MWYwYSIsICJsaW51eC1rZXJuZWxAdmdlci5rZXJuZWwub3JnIiwgImJlOWU0YSJd Received: from smtp.codeaurora.org (ec2-35-166-182-171.us-west-2.compute.amazonaws.com [35.166.182.171]) by mxa.mailgun.org with ESMTP id 5e33b082.7f8d58e4b180-smtp-out-n02; Fri, 31 Jan 2020 04:43:46 -0000 (UTC) Received: by smtp.codeaurora.org (Postfix, from userid 1001) id B7A2DC433A2; Fri, 31 Jan 2020 04:43:46 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-caf-mail-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=2.0 tests=ALL_TRUSTED,SPF_NONE autolearn=ham autolearn_force=no version=3.4.0 Received: from akdwived-linux.qualcomm.com (blr-c-bdr-fw-01_GlobalNAT_AllZones-Outside.qualcomm.com [103.229.19.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: akdwived) by smtp.codeaurora.org (Postfix) with ESMTPSA id C87ADC43383; Fri, 31 Jan 2020 04:43:42 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org C87ADC43383 Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; spf=none smtp.mailfrom=akdwived@codeaurora.org From: Avaneesh Kumar Dwivedi To: linux-arm-msm@vger.kernel.org, linux-usb@vger.kernel.org, devicetree@vger.kernel.org Cc: linux-kernel@vger.kernel.org, ckadabi@codeaurora.org, tsoni@codeaurora.org, bryanh@codeaurora.org, psodagud@codeaurora.org, rnayak@codeaurora.org, satyap@codeaurora.org, pheragu@codeaurora.org, Avaneesh Kumar Dwivedi Subject: [PATCH v4 0/2] Add Embedded USB Debugger (EUD) driver Date: Fri, 31 Jan 2020 10:13:29 +0530 Message-Id: <1580445811-15948-1-git-send-email-akdwived@codeaurora.org> X-Mailer: git-send-email 1.9.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This is a series of patches that implements a driver for the control peripheral, EUD (Embedded USB Debugger). The EUD is a mini-USB hub implemented on chip to support the USB-based debug and trace capabilities. Apart from debug capabilities, EUD has a control peripheral. Control Peripheral is on when EUD is on and gets signals like USB attach, pet EUD, charge phone etc. EUD driver listens to events like USB attach or detach and charger enable or disable and then notifies the USB driver or PMIC driver respectively about these events via EXTCON. At regular intervals, the EUD driver receives an interrupt to pet the driver indicating that the software is functional. Changes since v3: - Remove power supply type check in the enable path of EUD - Use default attribute group to create sysfs attribute - Updated the dt-binding Changes since v2: - Remove module_param and add sysfs support instead - Simplify if-else condition - Change if-elseif to switch case - Return -ENOMEM - Got rid of unnecessary checks in sysfs store function - Updated the dt-binding Changes since v1: - Remove EUD_NR as it is an unused macro Changes since v0: - Remove select SERIAL_CORE from Kconfig as this patch doesn't involve anything related to serial console - Changed the dt-bindings to remove extcon and replace it with graphs to represent a connection with client Avaneesh Kumar Dwivedi (2): dt-bindings: Documentation for qcom,eud Embedded USB Debugger (EUD) driver Documentation/ABI/stable/sysfs-driver-msm-eud | 5 + .../devicetree/bindings/soc/qcom/qcom,msm-eud.txt | 43 +++ drivers/soc/qcom/Kconfig | 12 + drivers/soc/qcom/Makefile | 1 + drivers/soc/qcom/eud.c | 329 +++++++++++++++++++++ 5 files changed, 390 insertions(+) create mode 100644 Documentation/ABI/stable/sysfs-driver-msm-eud create mode 100644 Documentation/devicetree/bindings/soc/qcom/qcom,msm-eud.txt create mode 100644 drivers/soc/qcom/eud.c -- Qualcomm India Private Limited, on behalf of Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project.