From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756691Ab2IJIyp (ORCPT ); Mon, 10 Sep 2012 04:54:45 -0400 Received: from smtp4.mundo-r.com ([212.51.32.151]:27136 "EHLO smtp4.mundo-r.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756014Ab2IJIuz (ORCPT ); Mon, 10 Sep 2012 04:50:55 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ap8CAHGoTVBbdWObgWdsb2JhbABFhge1SiIBARYmJ4IgAQEFIw8BNBIQIAUCJgICVwYTiBSoFZI7gSGPFoESA5VdkwU X-IronPort-AV: E=Sophos;i="4.80,397,1344204000"; d="scan'208";a="949262488" From: =?UTF-8?q?Samuel=20Iglesias=20Gons=C3=A1lvez?= To: Greg Kroah-Hartman Cc: devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org, industrypack-devel@lists.sourceforge.net, Jens Taprogge , =?UTF-8?q?Samuel=20Iglesias=20Gons=C3=A1lvez?= Subject: [PATCH 02/20] Staging: ipack: Provide several carrier callbacks. Date: Mon, 10 Sep 2012 10:51:40 +0200 Message-Id: <1347267118-9580-2-git-send-email-siglesias@igalia.com> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1347267118-9580-1-git-send-email-siglesias@igalia.com> References: <1347267118-9580-1-git-send-email-siglesias@igalia.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Jens Taprogge We provide callbacks to: - set/get the clockrate a module is accessed at, - get the error state of a slot, - get/reset the timeout state of a slot. Signed-off-by: Jens Taprogge Signed-off-by: Samuel Iglesias Gonsálvez --- drivers/staging/ipack/ipack.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/drivers/staging/ipack/ipack.h b/drivers/staging/ipack/ipack.h index 0f482fd..0526613 100644 --- a/drivers/staging/ipack/ipack.h +++ b/drivers/staging/ipack/ipack.h @@ -113,6 +113,15 @@ struct ipack_driver { * @request_irq: request IRQ * @free_irq: free IRQ * @remove_device: tell the bridge module that the device has been removed + * @get_clockrate: Returns the clockrate the carrier is currently + * communicating with the device at. + * @set_clockrate: Sets the clock-rate for carrier / module communication. + * Should return -EINVAL if the requested speed is not supported. + * @get_error: Returns the error state for the slot the device is attached + * to. + * @get_timeout: Returns 1 if the communication with the device has + * previously timed out. + * @reset_timeout: Resets the state returned by get_timeout. */ struct ipack_bus_ops { int (*map_space) (struct ipack_device *dev, unsigned int memory_size, int space); @@ -120,6 +129,12 @@ struct ipack_bus_ops { int (*request_irq) (struct ipack_device *dev, int vector, int (*handler)(void *), void *arg); int (*free_irq) (struct ipack_device *dev); int (*remove_device) (struct ipack_device *dev); + + int (*get_clockrate) (struct ipack_device *dev); + int (*set_clockrate) (struct ipack_device *dev, int mherz); + int (*get_error) (struct ipack_device *dev); + int (*get_timeout) (struct ipack_device *dev); + int (*reset_timeout) (struct ipack_device *dev); }; /** -- 1.7.10.4