lkml.org 
[lkml]   [2004]   [Dec]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    SubjectRe: [PATCH 1/1] driver: Tpm hardware enablement
    From
    Date
    Hi, 

    On Thu, 2004-12-09 at 09:25 -0600, Kylene Hall wrote:
    > + /* Determine chip type */
    > + if (tpm_nsc_init(chip) == 0) {
    > + chip->recv = tpm_nsc_recv;
    > + chip->send = tpm_nsc_send;
    > + chip->cancel = tpm_nsc_cancel;
    > + chip->req_complete_mask = NSC_STATUS_OBF;
    > + chip->req_complete_val = NSC_STATUS_OBF;
    > + } else if (tpm_atml_init(chip) == 0) {
    > + chip->recv = tpm_atml_recv;
    > + chip->send = tpm_atml_send;
    > + chip->cancel = tpm_atml_cancel;
    > + chip->req_complete_mask =
    > + ATML_STATUS_BUSY | ATML_STATUS_DATA_AVAIL;
    > + chip->req_complete_val = ATML_STATUS_DATA_AVAIL;
    > + } else {
    > + rc = -ENODEV;
    > + goto out_release;
    > + }

    The atmel part at least also comes as an I2C variant.

    We could continue to add to the ifelse here but perhaps it might be
    beneficial to split the individual chip specific stuff into separate
    files now and perhaps register them via some sort of
    register_tpm_hardware(struct tpm_chip_ops *) type interface?

    Ian.

    --
    Ian Campbell, Senior Design Engineer
    Web: http://www.arcom.com
    Arcom, Clifton Road, Direct: +44 (0)1223 403 465
    Cambridge CB1 7EA, United Kingdom Phone: +44 (0)1223 411 200

    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2005-03-22 14:08    [W:0.020 / U:31.104 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site